aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--evil-search.el13
1 files changed, 7 insertions, 6 deletions
diff --git a/evil-search.el b/evil-search.el
index 58b6023..51ac361 100644
--- a/evil-search.el
+++ b/evil-search.el
@@ -610,12 +610,13 @@ The following properties are supported:
'all-windows)
(get-buffer-window-list (current-buffer) nil t)
(list (evil-ex-hl-window hl))))
- (let ((beg (max (window-start win)
- (or (evil-ex-hl-min hl) (point-min))))
- (end (min (window-end win)
- (or (evil-ex-hl-max hl) (point-max)))))
- (when (< beg end)
- (push (cons beg end) ranges))))
+ (when (window-live-p win)
+ (let ((beg (max (window-start win)
+ (or (evil-ex-hl-min hl) (point-min))))
+ (end (min (window-end win)
+ (or (evil-ex-hl-max hl) (point-max)))))
+ (when (< beg end)
+ (push (cons beg end) ranges)))))
(setq ranges
(sort ranges #'(lambda (r1 r2) (< (car r1) (car r2)))))
(while ranges