diff options
| author | Daniel Mendler <mail@daniel-mendler.de> | 2021-08-09 06:47:11 +0200 |
|---|---|---|
| committer | Daniel Mendler <mail@daniel-mendler.de> | 2021-08-09 06:47:11 +0200 |
| commit | 000a413d85f3e989b7962e9789f7bfeacccf340b (patch) | |
| tree | 7753a9e883e265be9fe146483d79e6169d32e536 | |
| parent | 8271ece4a710f2794c06f1cec23b927e2f3bafd1 (diff) | |
Latency improvements, see #48
Add a redisplay before the expensive candidate recomputation
and before hiding the popup.
| -rw-r--r-- | corfu.el | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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) |
