emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/vcomplete e320d50fb4 28/91: Make auto updating the complet


From: ELPA Syncer
Subject: [nongnu] elpa/vcomplete e320d50fb4 28/91: Make auto updating the completion list buffer more responsive
Date: Tue, 24 May 2022 15:59:07 -0400 (EDT)

branch: elpa/vcomplete
commit e320d50fb4a69661ee6812f3a056a357f60fcda1
Author: Daniel Semyonov <cmstr@dsemy.com>
Commit: Daniel Semyonov <cmstr@dsemy.com>

    Make auto updating the completion list buffer more responsive
    
    * vcomplete.el (vcomplete--set-last-string-in-minibuffer)
    (vcomplete--set-last-string-in-region): Wrap in
    '(while-no-input (redisplay) CODE)'.
---
 vcomplete.el | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/vcomplete.el b/vcomplete.el
index 1b890d6447..7cd30f54d9 100644
--- a/vcomplete.el
+++ b/vcomplete.el
@@ -184,18 +184,23 @@ With prefix argument N, move N items (negative N means 
move forward)."
 
 (defun vcomplete--set-last-string-in-minibuffer ()
   "Set ‘vcomplete--last-string’ in a minibuffer."
-  (setq vcomplete--last-string (minibuffer-contents)))
+  (while-no-input
+    (redisplay)
+    (setq vcomplete--last-string (minibuffer-contents))))
 
 (defun vcomplete--string-in-region ()
-  "Return a substring according to the markers in 
‘completion-in-region--data’."
+  "Return a substring according to the markers in
+‘completion-in-region--data’."
   (when completion-in-region--data
     (buffer-substring (car completion-in-region--data)
                       (cadr completion-in-region--data))))
 
 (defun vcomplete--set-last-string-in-region ()
   "Set ‘vcomplete--last-string’ in-region."
-  (setq vcomplete--last-string
-        (vcomplete--string-in-region)))
+  (while-no-input
+    (redisplay)
+    (setq vcomplete--last-string
+          (vcomplete--string-in-region))))
 
 (defun vcomplete--update-in-minibuffer ()
   "Update the completion list when completing in a minibuffer."



reply via email to

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