summaryrefslogtreecommitdiff
path: root/lisp/ido.el
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2020-01-22 07:55:18 -0800
committerGlenn Morris <rgm@gnu.org>2020-01-22 07:55:18 -0800
commit5715eb94e90b33ace59dd4c4ccb6e2122bc6db72 (patch)
tree1c3aef6f5135b25738cd0d3a98ad807ec698ac1e /lisp/ido.el
parenta1bfb926ca484190298045fc9e775002fe872bb5 (diff)
parent3b0938c0420de2b845e7e8f8fbbb57ddc61718f2 (diff)
downloademacs-5715eb94e90b33ace59dd4c4ccb6e2122bc6db72.tar.gz
emacs-5715eb94e90b33ace59dd4c4ccb6e2122bc6db72.tar.bz2
emacs-5715eb94e90b33ace59dd4c4ccb6e2122bc6db72.zip
Merge from origin/emacs-27
3b0938c042 (origin/emacs-27) Render Ido suggestions using an overlay d5d90dc412 * doc/misc/tramp.texi (Bug Reports): Encourage use of "ema... ac09e8e121 * lisp/vc/smerge-mode.el (smerge-match-conflict): Fix bug#... 7e37e61f4b Correct statement about ftcr and recommend HarfBuzz 4aec94da37 Avoid leaving artifacts when the system caret is used on w32 5abd8d73b0 Improve display of temporary echo messages
Diffstat (limited to 'lisp/ido.el')
-rw-r--r--lisp/ido.el10
1 files changed, 9 insertions, 1 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)