emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/xeft ebaa0d493f 2/3: Scroll to the search phrase in pre


From: ELPA Syncer
Subject: [elpa] externals/xeft ebaa0d493f 2/3: Scroll to the search phrase in preview window (issue#29)
Date: Fri, 15 Sep 2023 03:58:53 -0400 (EDT)

branch: externals/xeft
commit ebaa0d493ff47243dfb68190e156e2f62bb9ca0c
Author: Yuan Fu <casouri@gmail.com>
Commit: Yuan Fu <casouri@gmail.com>

    Scroll to the search phrase in preview window (issue#29)
    
    * xeft.el (xeft--preview-file): Scroll to the first search phrase.
---
 xeft.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/xeft.el b/xeft.el
index 8783894f96..e6f151c6e5 100644
--- a/xeft.el
+++ b/xeft.el
@@ -500,7 +500,10 @@ If SELECT is non-nil, select the buffer after displaying 
it."
     (if (and (window-live-p xeft--preview-window)
              (not (eq xeft--preview-window (selected-window))))
         (with-selected-window xeft--preview-window
-          (switch-to-buffer buffer))
+          (switch-to-buffer buffer)
+          (when keyword-list
+            (let ((case-fold-search t))
+              (search-forward (car keyword-list) nil t))))
       (setq xeft--preview-window
             (display-buffer
              buffer '((display-buffer-use-some-window



reply via email to

[Prev in Thread] Current Thread [Next in Thread]