branch: externals/vertico commit 8bc3aac63fc729933706fc4cc2f4db3d8d2467f6 Author: Daniel Mendler <m...@daniel-mendler.de> Commit: Daniel Mendler <m...@daniel-mendler.de>
Prevent recursive exhibit --- vertico.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/vertico.el b/vertico.el index 66401f14c2..8932f33662 100644 --- a/vertico.el +++ b/vertico.el @@ -427,10 +427,12 @@ The function is configured by BY, BSIZE, BINDEX, BPRED and PRED." (content (minibuffer-contents-no-properties)) (input (cons content pt))) (unless (or (and interruptible (input-pending-p)) (equal vertico--input input)) - ;; Redisplay the minibuffer such that the input becomes immediately - ;; visible before the expensive candidate recomputation (Issue #89). - ;; Do not redisplay during initialization, since this leads to flicker. - (when (and interruptible (consp vertico--input)) (redisplay)) + ;; Redisplay to make input immediately visible before expensive candidate + ;; recomputation (#89). No redisplay during init because of flicker. + ;; Bind `vertico--input' to nil to prevent recursive exhibit from a timer, + ;; e.g., `consult--vertico-refresh'. + (when (and interruptible (consp vertico--input)) + (let (vertico--input) (redisplay))) (pcase (let ((vertico--metadata (completion-metadata (substring content 0 pt) minibuffer-completion-table minibuffer-completion-predicate)))