* bug#59455: 29.0.50; Treesit font lock changes unrelated code
@ 2022-11-21 20:12 Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-22 10:05 ` Yuan Fu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-23 18:33 ` Yuan Fu
0 siblings, 2 replies; 4+ messages in thread
From: Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-11-21 20:12 UTC (permalink / raw)
To: 59455; +Cc: casouri
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#59455: 29.0.50; Treesit font lock changes unrelated code
2022-11-21 20:12 bug#59455: 29.0.50; Treesit font lock changes unrelated code Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-11-22 10:05 ` Yuan Fu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-22 11:03 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-23 18:33 ` Yuan Fu
1 sibling, 1 reply; 4+ messages in thread
From: Yuan Fu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-11-22 10:05 UTC (permalink / raw)
To: Theodor Thornhill; +Cc: 59455
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.
Yuan
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#59455: 29.0.50; Treesit font lock changes unrelated code
2022-11-22 10:05 ` Yuan Fu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-11-22 11:03 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 0 replies; 4+ messages in thread
From: Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-11-22 11:03 UTC (permalink / raw)
To: Yuan Fu; +Cc: 59455
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?
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#59455: 29.0.50; Treesit font lock changes unrelated code
2022-11-21 20:12 bug#59455: 29.0.50; Treesit font lock changes unrelated code Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-22 10:05 ` Yuan Fu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-11-23 18:33 ` Yuan Fu
1 sibling, 0 replies; 4+ messages in thread
From: Yuan Fu @ 2022-11-23 18:33 UTC (permalink / raw)
To: Theodor Thornhill; +Cc: 59455-done, yuf011
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-11-23 18:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-21 20:12 bug#59455: 29.0.50; Treesit font lock changes unrelated code Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-22 10:05 ` Yuan Fu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-22 11:03 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-23 18:33 ` Yuan Fu
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.