branch: externals/indent-bars
commit 117121cbd62680e5abe5555ec63633e492fb0988
Author: JD Smith <[email protected]>
Commit: JD Smith <[email protected]>
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))