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: Dmitry Gutov
Subject: bug#66732: tree-sitter fontification doesn't update multi-line syntax reliably
Date: Sat, 23 Dec 2023 22:55:04 +0200
User-agent: Mozilla Thunderbird

On 23/12/2023 12:17, Eli Zaretskii wrote:
From: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: dmitry@gutov.dev,  66732@debbugs.gnu.org,  dominik@honnef.co,
   casouri@gmail.com
Date: Wed, 20 Dec 2023 15:50:21 -0500

I think Dmitry is talking about the case where the faces were change
after the text was rendered (but before the end of the redisplay cycle).

I.e. the redisplay starts, renders up to position POS, then calls
jit-lock because `fonfitied` is nil, and jit-lock modifies faces of text
*before* POS.

This can only happen if a function called from jit-lock doesn't comply
to the protocol wrt such changes, right?

I'm talking about a problem in the interaction between the redisplay
a jit-lock itself.

Jit-lock is aware of it and uses `jit-lock-force-redisplay` as needed to
account for it.

Because otherwise the modified region would have been re-rendered on
the next redisplay cycle at the latest.

Yes, if the jit-lock client (e.g. font-lock) follows the protocol, then
jit-lock should take care to re-render the regions when/where needed.

*Except* that the implementation of `jit-lock-force-redisplay` is
not effective and needs a change like the one suggested by Dmitry.

So can we install that change and close this bug, then?

That one-liner of mine was for a different feature which we ended up not using in the fix for this bug (font-lock-extend-region-functions).66732

I've pushed it to master now. Let me know if it should be backported.





reply via email to

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