* lisp/minibuffer.el (completion-pcm--merge-try): Merge trailing / with
suffix. Fixes: debbugs:15419
This commit is contained in:
parent
a5d09243e7
commit
34cba8e885
2 changed files with 17 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
|||
2014-05-14 Stephen Berman <stephen.berman@gmx.net>
|
||||
Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* minibuffer.el (completion-pcm--merge-try): Merge trailing / with
|
||||
suffix (bug#15419).
|
||||
|
||||
2014-05-14 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* vc/emerge.el (emerge-temp-file-prefix):
|
||||
|
|
|
@ -3215,11 +3215,20 @@ the same set of elements."
|
|||
;; Not `prefix'.
|
||||
mergedpat))
|
||||
;; New pos from the start.
|
||||
(newpos (length (completion-pcm--pattern->string pointpat)))
|
||||
(newpos (length (completion-pcm--pattern->string pointpat)))
|
||||
;; Do it afterwards because it changes `pointpat' by side effect.
|
||||
(merged (completion-pcm--pattern->string (nreverse mergedpat))))
|
||||
|
||||
(setq suffix (completion--merge-suffix merged newpos suffix))
|
||||
(setq suffix (completion--merge-suffix
|
||||
;; The second arg should ideally be "the position right
|
||||
;; after the last char of `merged' that comes from the text
|
||||
;; to be completed". But completion-pcm--merge-completions
|
||||
;; currently doesn't give us that info. So instead we just
|
||||
;; use the "last but one" position, which tends to work
|
||||
;; well in practice since `suffix' always starts
|
||||
;; with a boundary and we hence mostly/only care about
|
||||
;; merging this boundary (bug#15419).
|
||||
merged (max 0 (1- (length merged))) suffix))
|
||||
(cons (concat prefix merged suffix) (+ newpos (length prefix)))))))
|
||||
|
||||
(defun completion-pcm-try-completion (string table pred point)
|
||||
|
|
Loading…
Add table
Reference in a new issue