[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/corfu 000a413 1/2: Latency improvements, see #48
From: |
ELPA Syncer |
Subject: |
[elpa] externals/corfu 000a413 1/2: Latency improvements, see #48 |
Date: |
Mon, 9 Aug 2021 00:57:09 -0400 (EDT) |
branch: externals/corfu
commit 000a413d85f3e989b7962e9789f7bfeacccf340b
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Latency improvements, see #48
Add a redisplay before the expensive candidate recomputation
and before hiding the popup.
---
corfu.el | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/corfu.el b/corfu.el
index 851ce07..bc3c0ff 100644
--- a/corfu.el
+++ b/corfu.el
@@ -498,6 +498,10 @@ completion began less than that number of seconds ago."
(defun corfu--recompute-candidates (str metadata pt table pred)
"Recompute candidates from STR, METADATA, PT, TABLE and PRED."
+ ;; Redisplay such that the input becomes immediately visible before the
+ ;; expensive candidate recomputation is performed (Issue #48). See also
+ ;; corresponding vertico#89.
+ (redisplay)
(pcase-let* ((before (substring str 0 pt))
(after (substring str pt))
;; bug#47678: `completion-boundaries` fails for
`partial-completion`
@@ -859,6 +863,9 @@ completion began less than that number of seconds ago."
(defun corfu--teardown ()
"Teardown Corfu."
+ ;; Redisplay such that the input becomes immediately visible before the popup
+ ;; teardown (Issue #48). See also corresponding vertico#89.
+ (redisplay)
(corfu--popup-hide)
(remove-hook 'window-configuration-change-hook #'corfu--quit)
(remove-hook 'pre-command-hook #'corfu--pre-command 'local)