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

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

[nongnu] elpa/highlight-parentheses 5e1fa9d 22/49: Make overlays front-a


From: ELPA Syncer
Subject: [nongnu] elpa/highlight-parentheses 5e1fa9d 22/49: Make overlays front-advancing
Date: Sun, 15 Aug 2021 03:57:46 -0400 (EDT)

branch: elpa/highlight-parentheses
commit 5e1fa9d60cc1e2c8d71d04f09058060ae51a9560
Author: Tassilo Horn <tsdh@gnu.org>
Commit: Tassilo Horn <tsdh@gnu.org>

    Make overlays front-advancing
    
    Without that, when inserting text at
    
      (foo bar|)
    
    where | indicates point, the inserted text will be made part of the overlay
    initially until hl-paren-highlight is called the next time and thus have 
'face
    hl-paren-face.
    
    This hasn't really be needed when hl-paren-highlight has been called from
    pre-command-hook, but now with a more lazy approach to moving overlays it's 
very
    important.
---
 highlight-parentheses.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/highlight-parentheses.el b/highlight-parentheses.el
index eeee89f..1159b0f 100644
--- a/highlight-parentheses.el
+++ b/highlight-parentheses.el
@@ -156,7 +156,7 @@ This is used to prevent analyzing the same context over and 
over.")
         (setq attributes (plist-put attributes :background (car bg))))
       (pop bg)
       (dotimes (i 2) ;; front and back
-        (push (make-overlay 0 0) hl-paren-overlays)
+        (push (make-overlay 0 0 nil t) hl-paren-overlays)
         (overlay-put (car hl-paren-overlays) 'face attributes)))
     (setq hl-paren-overlays (nreverse hl-paren-overlays))))
 



reply via email to

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