emacs-devel
[Top][All Lists]
Advanced

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

Re: Initial fontification in sh-mode with tree-sittter


From: Eli Zaretskii
Subject: Re: Initial fontification in sh-mode with tree-sittter
Date: Tue, 01 Nov 2022 11:23:29 +0200

> From: Yuan Fu <casouri@gmail.com>
> Date: Tue, 1 Nov 2022 01:35:25 -0700
> Cc: Daniel Martín <mardani29@yahoo.es>,
>  João Paulo Labegalini de Carvalho <jaopaulolc@gmail.com>,
>  emacs-devel@gnu.org
> 
> 
> 
> > On Nov 1, 2022, at 12:13 AM, Eli Zaretskii <eliz@gnu.org> wrote:
> > 
> >> From: Yuan Fu <casouri@gmail.com>
> >> Date: Mon, 31 Oct 2022 17:25:01 -0700
> >> Cc: João Paulo Labegalini de Carvalho <jaopaulolc@gmail.com>, 
> >> emacs-devel@gnu.org
> >> 
> >>> Curiously, as soon as I press C-l, the text gets fontified with the
> >>> string face.
> >> 
> >> I think that’s just jit-lock & redisplay doing funny stuff. If you set 
> >> treesit--font-lock-verbose to t, it should log that appropriate faces are 
> >> applied when you insert the quote.
> > 
> > Which means you don't play by redisplay's rules in this case.  When
> > Lisp code changes faces, it should remove the 'fontified' property
> > from the text where faces changed.  Does your code do that?
> 
> I thought 'fontified should be set to t, and it is done by jit-lock? I also 
> thought changing the ‘face property should be enough to trigger redisplay, is 
> that true?

It should, but it doesn't in your case: the display engine is for some
reason not aware that faces changed in some areas, so it doesn't
redisplay those areas.  You need to figure out why.  Or show the code
which does that, and someone else will help you understand that.



reply via email to

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