Subject: bug#62333: 30.0.50; Issue with tree-sitter syntax tree during certain changes

From: Yuan Fu <[email-masked]>
Date: Thu, 23 Mar 2023 14:18:50 -0700

> On Mar 23, 2023, at 12:13 AM, Eli Zaretskii <[email-masked]> wrote:
> 
>> Date: Thu, 23 Mar 2023 06:20:19 +0200
>> Cc: Wilhelm Kirschbaum <[email-masked]>, [email-masked],
>> Eli Zaretskii <[email-masked]>
>> From: Dmitry Gutov <[email-masked]>
>> 
>> On 23/03/2023 05:03, Yuan Fu wrote:
>>> I suspect this has to do with the narrowed fontification we added for dealing with long lines.
>> 
>> I'm pretty sure that one should only get used when the buffer contains a 
>> line longer than 10000 characters.
> 
> Yes (but I believe the threshold is 50K characters).
> 
> The narrowing must come from somewhere else.  Yuan, how did you see
> that ZV was changed?  Can you run with a breakpoint in
> Fnarrow_to_region, and see which Lisp code does that?

I did that, some observations:

1. This doesn’t reproduce on Linux (it does on Mac).
2. The function that narrowed the region is blink-matching-open
3. If I (advice-add 'blink-matching-open :around #’ignore) on my Mac, it “solves” the problem

I guess the question now is why redisplay is triggered in blink-matching-open on Mac?

Yuan