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

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

[elpa] master adf7fd3 097/167: swiper.el (swiper--add-overlays): Take ex


From: Oleh Krehel
Subject: [elpa] master adf7fd3 097/167: swiper.el (swiper--add-overlays): Take extra WND arg
Date: Tue, 08 Dec 2015 10:50:15 +0000

branch: master
commit adf7fd321212002a7c35942a78f5643f735a1cfa
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    swiper.el (swiper--add-overlays): Take extra WND arg
---
 swiper.el |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/swiper.el b/swiper.el
index 595ed43..d1bf5de 100644
--- a/swiper.el
+++ b/swiper.el
@@ -395,9 +395,11 @@ When non-nil, INITIAL-INPUT is the initial search pattern."
             (recenter)))
         (swiper--add-overlays re)))))
 
-(defun swiper--add-overlays (re &optional beg end)
+(defun swiper--add-overlays (re &optional beg end wnd)
   "Add overlays for RE regexp in visible part of the current buffer.
-BEG and END, when specified, are the point bounds."
+BEG and END, when specified, are the point bounds.
+WND, when specified is the window."
+  (setq wnd (or wnd (ivy-state-window ivy-last)))
   (let ((ov (if visual-line-mode
                 (make-overlay
                  (save-excursion
@@ -410,7 +412,7 @@ BEG and END, when specified, are the point bounds."
                (line-beginning-position)
                (1+ (line-end-position))))))
     (overlay-put ov 'face 'swiper-line-face)
-    (overlay-put ov 'window (ivy-state-window ivy-last))
+    (overlay-put ov 'window wnd)
     (push ov swiper--overlays)
     (let* ((wh (window-height))
            (beg (or beg (save-excursion
@@ -440,7 +442,7 @@ BEG and END, when specified, are the point bounds."
                                      swiper-faces)))))
                     (push overlay swiper--overlays)
                     (overlay-put overlay 'face face)
-                    (overlay-put overlay 'window (ivy-state-window ivy-last))
+                    (overlay-put overlay 'window wnd)
                     (overlay-put overlay 'priority i)))
                 (cl-incf i)))))))))
 



reply via email to

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