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

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

[nongnu] elpa/idle-highlight-mode 0423fc2b38 55/59: Fix #2 Substrings of


From: ELPA Syncer
Subject: [nongnu] elpa/idle-highlight-mode 0423fc2b38 55/59: Fix #2 Substrings of identifiers are highlighted
Date: Thu, 7 Jul 2022 12:00:33 -0400 (EDT)

branch: elpa/idle-highlight-mode
commit 0423fc2b387dae8750901fbe603b750b8d7abe43
Author: Campbell Barton <ideasman42@gmail.com>
Commit: Campbell Barton <ideasman42@gmail.com>

    Fix #2 Substrings of identifiers are highlighted
    
    Scan for symbol bounds instead of word bounds.
---
 changelog.rst          | 2 +-
 idle-highlight-mode.el | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/changelog.rst b/changelog.rst
index 0fb8801733..364085a28b 100644
--- a/changelog.rst
+++ b/changelog.rst
@@ -1,5 +1,5 @@
 - In development (2022-01-20)
-
+  - Fix #2 use symbol instead of word bounds when scanning items to highlight.
   - Fix #1 font face detection when overlays were in use (such as 
``hl-line-mode``).
   - Fix highlighting with multiple windows sharing one buffer.
   - Add ``idle-highlight-visible-buffers`` to support highlighting all buffers 
with the current symbol.
diff --git a/idle-highlight-mode.el b/idle-highlight-mode.el
index 331c740896..9b675aabd9 100755
--- a/idle-highlight-mode.el
+++ b/idle-highlight-mode.el
@@ -232,7 +232,7 @@ Where RANGES is an unordered list of (min . max) cons 
cells."
 Argument VISIBLE-RANGES is a list of (min . max) ranges to highlight."
   (idle-highlight--unhighlight)
   (save-excursion
-    (let ((target-regexp (concat "\\<" (regexp-quote target) "\\>")))
+    (let ((target-regexp (concat "\\_<" (regexp-quote target) "\\_>")))
       (dolist (range visible-ranges)
         (pcase-let ((`(,beg . ,end) range))
           (goto-char beg)



reply via email to

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