]> git.eshelyaron.com Git - emacs.git/commitdiff
; show-paren: improve previous commit bb69361cbe
authorTassilo Horn <tsdh@gnu.org>
Wed, 9 Feb 2022 19:48:02 +0000 (20:48 +0100)
committerTassilo Horn <tsdh@gnu.org>
Wed, 9 Feb 2022 19:48:02 +0000 (20:48 +0100)
Update show-paren--last-pos also in the "not at paren position" case.
Otherwise, we don't get the context info when moving point from a
paren position to a non-paren position and back again.

lisp/paren.el

index 4cef9756bc9b16d9568fdd67e09dfd0de06a614b..4e67a4ea4f7bbd11e193ff247437a17f210256b8 100644 (file)
@@ -412,7 +412,8 @@ It is the default value of `show-paren-data-function'."
           ;; If show-paren-mode is nil in this buffer or if not at a paren that
           ;; has a match, turn off any previous paren highlighting.
           (delete-overlay show-paren--overlay)
-          (delete-overlay show-paren--overlay-1))
+          (delete-overlay show-paren--overlay-1)
+          (setq show-paren--last-pos (point)))
 
       ;; Found something to highlight.
       (let* ((here-beg (nth 0 data))