branch: elpa/vcomplete commit e320d50fb4a69661ee6812f3a056a357f60fcda1 Author: Daniel Semyonov <cm...@dsemy.com> Commit: Daniel Semyonov <cm...@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."