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

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

[elpa] externals/indent-bars 117121cbd6 230/431: Guard update-scope agai


From: ELPA Syncer
Subject: [elpa] externals/indent-bars 117121cbd6 230/431: Guard update-scope against non-mode buffers
Date: Mon, 16 Sep 2024 12:59:31 -0400 (EDT)

branch: externals/indent-bars
commit 117121cbd62680e5abe5555ec63633e492fb0988
Author: JD Smith <93749+jdtsmith@users.noreply.github.com>
Commit: JD Smith <93749+jdtsmith@users.noreply.github.com>

    Guard update-scope against non-mode buffers
    
    Even a local PCH gets called in other buffers when changing buffers.
    Guard against by insisting the current style (a buffer-local) is set.
---
 indent-bars-ts.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/indent-bars-ts.el b/indent-bars-ts.el
index 62f0e36060..38b170c81e 100644
--- a/indent-bars-ts.el
+++ b/indent-bars-ts.el
@@ -288,8 +288,9 @@ scope bounds.  If it has changed (beyond normal marker 
movement),
 refontify the symmetric difference between the old and new
 ranges (i.e those ranges covered by either old or new, but not
 both)."
-  (unless (and (= (point) (ibts/point ibtcs))
-              (= (buffer-modified-tick) (ibts/tick ibtcs)))
+  (unless (or (not ibtcs) ; can be called in other buffers too
+             (and (= (point) (ibts/point ibtcs))
+                  (= (buffer-modified-tick) (ibts/tick ibtcs))))
     (when-let ((node (treesit-node-on
                      (max (point-min) (1- (point))) (point)
                      indent-bars-ts--parser))



reply via email to

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