summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2022-08-03 03:34:37 +0100
committerjao <jao@gnu.org>2022-08-03 03:34:37 +0100
commit8ba4d4b9b898016f765e6f18ac294166ff7796e6 (patch)
treea7f7771f924fd77ca5a3c37c1fbe674ab5dbf2ca
parent47b47e8a4701575e8ecb447431f23b21c10d3229 (diff)
hide cursor in non-selected preview windows
-rw-r--r--consult-recoll.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/consult-recoll.el b/consult-recoll.el
index eec67ce..9f3c7a6 100644
--- a/consult-recoll.el
+++ b/consult-recoll.el
@@ -142,6 +142,7 @@ Set to nil to use the default 'title (path)' format."
"Preview search result CANDIDATE when ACTION is \\='preview."
(cond ((or (eq action 'setup) (null candidate))
(with-current-buffer (get-buffer-create consult-recoll--preview-buffer)
+ (setq-local cursor-in-non-selected-windows nil)
(delete-region (point-min) (point-max))))
((and (eq action 'preview) candidate)
(when-let* ((url (consult-recoll--candidate-url candidate))
@@ -153,7 +154,8 @@ Set to nil to use the default 'title (path)' format."
(insert (propertize url 'face 'consult-recoll-url-face) "\n")
(insert (propertize (consult-recoll--candidate-mime candidate)
'face 'consult-recoll-mime-face))
- (when-let (s (consult-recoll--snippets candidate)) (insert "\n" s)))
+ (when-let (s (consult-recoll--snippets candidate)) (insert "\n" s))
+ (goto-char (point-min)))
(pop-to-buffer buff)))
((eq action 'exit)
(when (get-buffer consult-recoll--preview-buffer)