diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ido.el | 10 | ||||
-rw-r--r-- | lisp/minibuffer.el | 10 | ||||
-rw-r--r-- | lisp/vc/smerge-mode.el | 5 |
3 files changed, 21 insertions, 4 deletions
diff --git a/lisp/ido.el b/lisp/ido.el index 83b88e4e81c..355be5eaa66 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -4492,6 +4492,8 @@ For details of keybindings, see `ido-find-file'." (ido-tidy)) (throw 'ido contents)))) +(defvar ido--overlay nil) + (defun ido-exhibit () "Post command hook for Ido." ;; Find matching files and display a list in the minibuffer. @@ -4726,7 +4728,13 @@ For details of keybindings, see `ido-find-file'." (let ((inf (ido-completions contents))) (setq ido-show-confirm-message nil) (ido-trace "inf" inf) - (insert inf)) + (when ido--overlay + (delete-overlay ido--overlay)) + (let ((o (make-overlay (point-max) (point-max) nil t t))) + (when (> (length inf) 0) + (put-text-property 0 1 'cursor t inf)) + (overlay-put o 'after-string inf) + (setq ido--overlay o))) )))) (defun ido-completions (name) diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 4831bf72e9d..0589211877a 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -766,7 +766,7 @@ and `clear-minibuffer-message' called automatically via (defun set-minibuffer-message (message) "Temporarily display MESSAGE at the end of the minibuffer. The text is displayed for `minibuffer-message-clear-timeout' seconds -(if the value is a number), or until the next input event arrives, +\(if the value is a number), or until the next input event arrives, whichever comes first. Unlike `minibuffer-message', this function is called automatically via `set-message-function'." @@ -790,8 +790,14 @@ via `set-message-function'." ;; The current C cursor code doesn't know to use the overlay's ;; marker's stickiness to figure out whether to place the cursor ;; before or after the string, so let's spoon-feed it the pos. - (put-text-property 0 1 'cursor t message)) + (put-text-property 0 1 'cursor 1 message)) (overlay-put minibuffer-message-overlay 'after-string message) + ;; Make sure the overlay with the message is displayed before + ;; any other overlays in that position, in case they have + ;; resize-mini-windows set to nil and the other overlay strings + ;; are too long for the mini-window width. This makes sure the + ;; temporary message will always be visible. + (overlay-put minibuffer-message-overlay 'priority 1100) (when (numberp minibuffer-message-clear-timeout) (setq minibuffer-message-timer diff --git a/lisp/vc/smerge-mode.el b/lisp/vc/smerge-mode.el index d4984bbd38b..85868b91ecc 100644 --- a/lisp/vc/smerge-mode.el +++ b/lisp/vc/smerge-mode.el @@ -797,7 +797,10 @@ An error is raised if not inside a conflict." (filename (or (match-string 1) "")) (_ (re-search-forward smerge-end-re)) - (_ (cl-assert (< orig-point (match-end 0)))) + (_ (when (< (match-end 0) orig-point) + ;; Point is not within the conflict we found, + ;; so this conflict is not ours. + (signal 'search-failed (list smerge-begin-re)))) (lower-end (match-beginning 0)) (end (match-end 0)) |