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

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

bug#66732: tree-sitter fontification doesn't update multi-line syntax re


From: Yuan Fu
Subject: bug#66732: tree-sitter fontification doesn't update multi-line syntax reliably
Date: Sat, 16 Dec 2023 17:16:17 -0800


> On Dec 16, 2023, at 3:09 PM, Dmitry Gutov <dmitry@gutov.dev> wrote:
> 
> On 16/12/2023 21:18, Yuan Fu wrote:
>>> Indeed we don't want to do it directly in `after-change-functions`, but
>>> doing it in `font-lock-default-fontify-region` is too late because the
>>> redisplay and jit-lock have already (to some extent) decided what should
>>> be refontified at that point.
>>> 
>>> The infrastructure does offer ways to make it work (to fix previous
>>> incorrect assumptions about what needed to be redisplayed/refontified),
>>> but it's best if we can avoid it.
>> I tried forcing reparse in pre-redisplay-functions, and it seems to work 
>> fine! See attached diff. The delist part can be improved a bit, but this is 
>> just a POC.
> 
> This also works.

Ok, if there’s no objections, I’ll apply this patch.

Yuan

Attachment: pre-redisplay.patch
Description: Binary data


reply via email to

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