branch: externals/consult commit 95d1851567637325425c0956adbf711c801dd45c Author: Daniel Mendler <m...@daniel-mendler.de> Commit: Daniel Mendler <m...@daniel-mendler.de>
Fix candidate preview for collect and default completion --- consult.el | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/consult.el b/consult.el index 6c7d8e8053..21e5b442ee 100644 --- a/consult.el +++ b/consult.el @@ -1297,9 +1297,8 @@ and CANDIDATE." (setq consult--preview-function (let ((last-preview)) (lambda () - (with-selected-window (or (active-minibuffer-window) - (selected-window)) - (when-let (cand (funcall candidate)) + (when-let (cand (funcall candidate)) + (with-selected-window (active-minibuffer-window) (let ((input (minibuffer-contents-no-properties))) (with-selected-window (or (minibuffer-selected-window) (next-window)) (let ((transformed (funcall transform input cand))