]> git.eshelyaron.com Git - emacs.git/commitdiff
Improve fix for icomplete's backward-kill-word bug#38024
authorJoão Távora <joaotavora@gmail.com>
Sat, 2 Nov 2019 02:29:56 +0000 (02:29 +0000)
committerJoão Távora <joaotavora@gmail.com>
Sat, 2 Nov 2019 02:35:45 +0000 (02:35 +0000)
* lisp/icomplete.el (icomplete-exhibit): Use
while-no-input-ignore-events, not redisplay.

Co-authored-by: Stefan Monnier <j.schmoe@example.org>
lisp/icomplete.el

index 02eae55a196a089404527311b3f7a5f32f00a323..89318ca4c7e97ff87c21c9b7740b7371b6147fdb 100644 (file)
@@ -399,8 +399,6 @@ Should be run via minibuffer `post-command-hook'.
 See `icomplete-mode' and `minibuffer-setup-hook'."
   (when (and icomplete-mode
              (icomplete-simple-completing-p)) ;Shouldn't be necessary.
-    (redisplay)     ; FIXME: why is this sometimes needed when moving
-                    ; up dirs in a file-finding table?
     (save-excursion
       (goto-char (point-max))
                                         ; Insert the match-status information:
@@ -420,6 +418,11 @@ See `icomplete-mode' and `minibuffer-setup-hook'."
                ;; embarking on computing completions:
                (sit-for icomplete-compute-delay)))
          (let* ((field-string (icomplete--field-string))
+                 ;; Not sure why, but such requests seem to come
+                 ;; every once in a while.  It's not fully
+                 ;; deterministic but `C-x C-f M-DEL M-DEL ...'
+                 ;; seems to trigger it fairly often!
+                 (while-no-input-ignore-events '(selection-request))
                  (text (while-no-input
                          (icomplete-completions
                           field-string