GNU bug report logs -
#59455
29.0.50; Treesit font lock changes unrelated code
Previous Next
Reported by: Theodor Thornhill <theo <at> thornhill.no>
Date: Mon, 21 Nov 2022 20:14:02 UTC
Severity: normal
Found in version 29.0.50
Done: Yuan Fu <casouri <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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
This bug report was last modified 2 years and 239 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.