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

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

[nongnu] elpa/symbol-overlay ca3b02c99e 136/152: When highlighting, chec


From: ELPA Syncer
Subject: [nongnu] elpa/symbol-overlay ca3b02c99e 136/152: When highlighting, check current buffer is the one in selected-window
Date: Thu, 7 Jul 2022 12:04:22 -0400 (EDT)

branch: elpa/symbol-overlay
commit ca3b02c99ec3f85b15b9928c3c81a80b381bce22
Author: Steve Purcell <steve@sanityinc.com>
Commit: Steve Purcell <steve@sanityinc.com>

    When highlighting, check current buffer is the one in selected-window
    
    Just because a timer is triggered for a buffer does not mean that its
    window is selected.
---
 symbol-overlay.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/symbol-overlay.el b/symbol-overlay.el
index 650eab3142..a1fcc3e629 100644
--- a/symbol-overlay.el
+++ b/symbol-overlay.el
@@ -290,7 +290,7 @@ depending on SCOPE and WINDOW."
           (and p (setq min (progn (backward-paragraph) (point))
                        max (progn (forward-paragraph) (point))))
           (narrow-to-region min max)))
-    (when window
+    (when (and window (eq (window-buffer) (current-buffer)))
       (narrow-to-region (window-start) (window-end)))))
 
 (defun symbol-overlay-remove-temp ()
@@ -300,7 +300,7 @@ depending on SCOPE and WINDOW."
 
 (defun symbol-overlay-maybe-put-temp ()
   "Highlight symbol at point when there are more than 2 occurrences.
-This only effects symbols in the current displayed window if
+This only affects symbols in the current displayed window if
 `symbol-overlay-displayed-window' is non-nil."
   (when symbol-overlay-mode
     (let* ((case-fold-search nil)



reply via email to

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