Skip to content

Commit 5902317

Browse files
committed
bdx: Reduce flicker when the list is refreshed as user is typing
* bdx.el (bdx--ivy-collection-function): Only set `bdx--prev-candidates' when we have some existing candidates.
1 parent 4b47c07 commit 5902317

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

bdx.el

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,8 @@ as a property of the string."
254254
(defun bdx--ivy-collection-function (string &rest _args)
255255
"Collect candidates for query STRING.
256256
This should be used as COLLECTION for `ivy-read'."
257-
(setq bdx--prev-candidates bdx--all-candidates)
257+
(when bdx--all-candidates
258+
(setq bdx--prev-candidates bdx--all-candidates))
258259
(setq bdx--all-candidates nil)
259260
(setq bdx--outdated-files nil)
260261
(setq bdx--sources-needing-recompilation nil)

0 commit comments

Comments
 (0)