bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#64321: 29.0.92; Tree-Sitter/which-function Narrow/Widen causes modif


From: Yuan Fu
Subject: bug#64321: 29.0.92; Tree-Sitter/which-function Narrow/Widen causes modified buffer
Date: Wed, 28 Jun 2023 13:09:41 -0700


> On Jun 28, 2023, at 9:25 AM, Troy Brown <brownts@troybrown.dev> wrote:
> 
> On Wed, Jun 28, 2023 at 12:04 AM Yuan Fu <casouri@gmail.com> wrote:
>> 
>> Narrowing and widening are transparent to tree-sitter, so when the buffer 
>> widens, from tree-sitter’s POV, text are added to the buffer. Which-func 
>> calling the tree-sitter current-defund function ultimately leads to 
>> tree-sitter calling treesit—font-lock-notifier which puts text properties on 
>> the “added” portion of the buffer, which changed the modified status.
>> 
>> treesit—font-lock-notifier should put text properties without changing 
>> modified status, like what jit-lock does. This patch should fix it.
>> 
> 
> Thanks for the explanation and the supplied patch.  I can confirm that
> this patch fixes the issue.

Cool, thanks, pushed.

Yuan




reply via email to

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