bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#38457: 27.0.50; dabbrev-expand regression due to message change


From: Dmitry Gutov
Subject: bug#38457: 27.0.50; dabbrev-expand regression due to message change
Date: Sat, 18 Jan 2020 04:00:30 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

Eli, don't you think we should iron out this new feature's interaction with icomplete and ido before the release?

On 25.12.2019 19:30, Dmitry Gutov wrote:

Could ido-mode use an overlay the same way as it's used in icomplete
that plays nicely with the set-minibuffer-message overlay?

This seems to work, but it needs more testing:

diff --git a/lisp/ido.el b/lisp/ido.el
index 79f259b819..d47450fc40 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -4492,6 +4492,8 @@ ido-initiate-auto-merge
      (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,12 @@ ido-exhibit
      (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)






reply via email to

[Prev in Thread] Current Thread [Next in Thread]