[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: |
Eli Zaretskii |
Subject: |
bug#66732: tree-sitter fontification doesn't update multi-line syntax reliably |
Date: |
Sun, 29 Oct 2023 14:22:30 +0200 |
> Date: Wed, 25 Oct 2023 02:15:30 +0300
> From: Dmitry Gutov <dmitry@gutov.dev>
>
> Hi Dominik,
>
> On 24/10/2023 17:22, Dominik Honnef wrote:
> > Steps to reproduce:
> >
> > 1. Start emacs -q
> > 2. Clear the scratch buffer
> > 3. Switch to c-ts-mode
> > 4. Type the following:
> >
> > /* foo
> > bar
> > baz
> > */
> >
> > Notice the following:
> >
> > 1. tree-sitter will not parse the buffer contents as a comment until the
> > closing comment marker is typed (not an issue per se.)
> >
> > 2. When you type the closing comment marker, only that line will be
> > fontified.
> >
> > 3. Moving to the previous line will refontify the whole comment.
> >
> > Similarly, removing the closing comment marker will not instantly
> > refontify the buffer, either.
> >
> > The expected behavior would be for the whole comment to be refontified
> > immediately after typing the closing comment marker.
> >
> > Other buffer contents often lead to even worse refontifying, where even
> > motion will not fix things.
>
> Can repro.
>
> Only with 'emacs -Q', though (note to others who will try).
Yuan, any ideas or comments?