From 88f193ed05649b8c622867b8b2623b8cb08fdc96 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jo=C3=A3o=20T=C3=A1vora?= Date: Sat, 2 Nov 2019 02:29:56 +0000 Subject: [PATCH] Improve fix for icomplete's backward-kill-word bug#38024 * lisp/icomplete.el (icomplete-exhibit): Use while-no-input-ignore-events, not redisplay. Co-authored-by: Stefan Monnier --- lisp/icomplete.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/icomplete.el b/lisp/icomplete.el index 02eae55a196..89318ca4c7e 100644 --- a/lisp/icomplete.el +++ b/lisp/icomplete.el @@ -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 -- 2.39.5