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

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

bug#59455: closed (29.0.50; Treesit font lock changes unrelated code)


From: GNU bug Tracking System
Subject: bug#59455: closed (29.0.50; Treesit font lock changes unrelated code)
Date: Wed, 23 Nov 2022 18:34:02 +0000

Your message dated Wed, 23 Nov 2022 10:33:35 -0800
with message-id <81762C61-20E4-45C9-849D-178E3912171F@gmail.com>
and subject line Re: bug#59455: 29.0.50; Treesit font lock changes unrelated 
code
has caused the debbugs.gnu.org bug report #59455,
regarding 29.0.50; Treesit font lock changes unrelated code
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
59455: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59455
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: 29.0.50; Treesit font lock changes unrelated code Date: Mon, 21 Nov 2022 21:12:51 +0100
Hi Yuan!

I've noticed some strange behavior with font-lock lately in c-ts-mode,
and also in all the other ts modes.

to reproduce:

emacs -Q

C-x C-f foo.c RET

Insert this:

```
/* lol lol lol lol lol lol lol lol lol lol */
/* lol lol lol lol lol lol lol lol lol lol */
/* lol lol lol lol lol lol lol lol lol lol */
/* lol lol lol lol lol lol lol lol lol lol */
/* lol lol lol lol lol lol lol lol lol lol */
/* lol lol lol lol lol lol lol lol lol lol */
/* lol lol lol lol lol lol lol lol lol lol */
/* lol lol lol lol lol lol lol lol lol lol */
/* lol lol lol lol lol lol lol lol lol lol */

int
foo (void)
{
  return 5;
}

int
foo (void)
{
  if (x)
    {
      return 5;
    }
}

int
foo (void)
{
  return 5;
}
```

M-x c-ts-mode RET

Now on the first line, repeatedly press 'M-c' (capitalize-word) and
watch the highlights of the rest of the file jump around.  Then try
undoing the changes by repeatedly pressing 'C-/' until you are back at
the state right after the first insert.  Now highlights are messed up.

I'm not sure where to start looking for this, but I do remember there
being some issues in Eglot with these "multi-edit" commands.

If you have some pointers for where to look I can dig around :)

Theo



--- End Message ---
--- Begin Message --- Subject: Re: bug#59455: 29.0.50; Treesit font lock changes unrelated code Date: Wed, 23 Nov 2022 10:33:35 -0800
Theodor Thornhill <theo@thornhill.no> writes:

> On 22 November 2022 11:05:50 CET, Yuan Fu <yuf011@ucsd.edu> wrote:
>>
>>Theodor Thornhill <theo@thornhill.no> writes:
>>
>>> Hi Yuan!
>>>
>>> I've noticed some strange behavior with font-lock lately in c-ts-mode,
>>> and also in all the other ts modes.
>>>
>>> to reproduce:
>>>
>>> emacs -Q
>>>
>>> C-x C-f foo.c RET
>>>
>>> Insert this:
>>>
>>> ```
>>> /* lol lol lol lol lol lol lol lol lol lol */
>>> /* lol lol lol lol lol lol lol lol lol lol */
>>> /* lol lol lol lol lol lol lol lol lol lol */
>>> /* lol lol lol lol lol lol lol lol lol lol */
>>> /* lol lol lol lol lol lol lol lol lol lol */
>>> /* lol lol lol lol lol lol lol lol lol lol */
>>> /* lol lol lol lol lol lol lol lol lol lol */
>>> /* lol lol lol lol lol lol lol lol lol lol */
>>> /* lol lol lol lol lol lol lol lol lol lol */
>>>
>>> int
>>> foo (void)
>>> {
>>>   return 5;
>>> }
>>>
>>> int
>>> foo (void)
>>> {
>>>   if (x)
>>>     {
>>>       return 5;
>>>     }
>>> }
>>>
>>> int
>>> foo (void)
>>> {
>>>   return 5;
>>> }
>>> ```
>>>
>>> M-x c-ts-mode RET
>>>
>>> Now on the first line, repeatedly press 'M-c' (capitalize-word) and
>>> watch the highlights of the rest of the file jump around.  Then try
>>> undoing the changes by repeatedly pressing 'C-/' until you are back at
>>> the state right after the first insert.  Now highlights are messed up.
>>>
>>> I'm not sure where to start looking for this, but I do remember there
>>> being some issues in Eglot with these "multi-edit" commands.
>>>
>>> If you have some pointers for where to look I can dig around :)
>>
>>Thanks for the catch! It is due to tree-sitter not correctly recording
>>changes in casefiddle.c. I’ve fixed it now. 
>
>
>> Now you can Lol as much as your heart desire.
>
> Don't you always capitalize lols at the top of your files? 

I should do it more, heard that it’s a good warm-up for programming :-)
Closing.

Yuan


--- End Message ---

reply via email to

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