[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#7215: 24.0.50; Minibuffer path completion mispositions point
From: |
Stefan Monnier |
Subject: |
bug#7215: 24.0.50; Minibuffer path completion mispositions point |
Date: |
Sun, 17 Oct 2010 13:31:34 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
> Now delete most of "directory", leaving the minibuffer as:
> Find file: .../dir*/subdir/
> Now press [tab]. This correctly completes "dir" back to "directory", but
> also moves point backwards, resulting in:
> Find file: .../di*rectory/subdir/
I've installed the patch below into the emacs-23 branch. This should
fix the problem. Please confirm,
Stefan
=== modified file 'lisp/minibuffer.el'
--- lisp/minibuffer.el 2010-10-03 19:50:14 +0000
+++ lisp/minibuffer.el 2010-10-17 17:26:12 +0000
@@ -498,10 +498,11 @@
(setq suffix-len (1+ suffix-len)))
(unless (zerop suffix-len)
(setq end (- end suffix-len))
- (setq newtext (substring newtext 0 (- suffix-len)))))
+ (setq newtext (substring newtext 0 (- suffix-len))))
(goto-char beg)
(insert newtext)
- (delete-region (point) (+ (point) (- end beg))))
+ (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.