1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-04 11:40:22 +00:00

* lisp/minibuffer.el (completion--replace): Move point where it belongs

when there's a common suffix.

Fixes: debbugs:7215
This commit is contained in:
Stefan Monnier 2010-10-17 13:30:22 -04:00
parent e499c64d97
commit 8348910a63
2 changed files with 10 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2010-10-17 Stefan Monnier <monnier@iro.umontreal.ca>
* minibuffer.el (completion--replace): Move point where it belongs
when there's a common suffix (bug#7215).
2010-10-15 Michael Albinus <michael.albinus@gmx.de>
* net/tramp.el (tramp-open-connection-setup-interactive-shell):

View File

@ -498,10 +498,11 @@ Moves point to the end of the new text."
(setq suffix-len (1+ suffix-len)))
(unless (zerop suffix-len)
(setq end (- end suffix-len))
(setq newtext (substring newtext 0 (- suffix-len)))))
(goto-char beg)
(insert newtext)
(delete-region (point) (+ (point) (- end beg))))
(setq newtext (substring newtext 0 (- suffix-len))))
(goto-char beg)
(insert newtext)
(delete-region (point) (+ (point) (- end beg)))
(forward-char suffix-len)))
(defun completion--do-completion (&optional try-completion-function)
"Do the completion and return a summary of what happened.