branch: externals/consult
commit 113169b65def19bfde80d469a0887d016d7d88f8
Author: Daniel Mendler <[email protected]>
Commit: Daniel Mendler <[email protected]>
Better *Completions* buffer detection
---
consult.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/consult.el b/consult.el
index 615aa9ee8f..a7aeac60a4 100644
--- a/consult.el
+++ b/consult.el
@@ -945,7 +945,7 @@ When no project is found and MAY-PROMPT is non-nil ask the
user."
(defun consult--completion-window-p ()
"Return non-nil if the selected window belongs to the completion UI."
(or (eq (selected-window) (active-minibuffer-window))
- (string-match-p "\\`\\*Completions\\*" (buffer-name (window-buffer)))))
+ (eq #'completion-list-mode (buffer-local-value 'major-mode
(window-buffer)))))
(defmacro consult--with-location-upgrade (candidates &rest body)
"Upgrade location markers from CANDIDATES on window selection change.