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.
master
Tassilo Horn 11 years ago
parent 8869fba83d
commit 5e1fa9d60c
  1. 2
      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))))

Loading…
Cancel
Save