Subject: bug#67977: 30.0.50; tree-sitter: Emacs crashes when accessing treesit-nodes in a narrowed buffer

From: Eli Zaretskii <[email-masked]>
Date: Thu, 28 Dec 2023 15:53:34 +0200

> Date: Thu, 28 Dec 2023 13:44:43 +0200
> Cc: Denis Zubarev <[email-masked]>, [email-masked]
> From: Dmitry Gutov <[email-masked]>
> 
> >> Could font-lock-dont-widen help, perhaps?
> > Yes. If font-lock doesn’t widen, then there wouldn’t be back-and-forth reparses.
> 
> But then treesit major modes will be affected by user narrowing (e.g. if 
> the user narrowed to inside the string, the buffer won't be highlighted 
> as a string).

Why is that a problem?  When the user narrows the buffer, the part
outside the narrowing doesn't exist as far as Emacs is concerned.