mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-23 07:19:15 +00:00
Render Ido suggestions using an overlay
* lisp/ido.el (ido--overlay): New variable. (ido-exhibit): Render with 'after-string' on an overlay (bug#38457).
This commit is contained in:
parent
d5d90dc412
commit
3b0938c042
10
lisp/ido.el
10
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)
|
||||
|
Loading…
Reference in New Issue
Block a user