From: Yuan Fu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Theodor Thornhill <theo@thornhill.no>
Cc: 59455@debbugs.gnu.org
Subject: bug#59455: 29.0.50; Treesit font lock changes unrelated code
Date: Tue, 22 Nov 2022 02:05:50 -0800 [thread overview]
Message-ID: <D28977D8-6C08-4FE4-A598-AF4B0FE861F3@ucsd.edu> (raw)
In-Reply-To: <87k03onk1o.fsf@thornhill.no>
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
next prev parent reply other threads:[~2022-11-22 10:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=D28977D8-6C08-4FE4-A598-AF4B0FE861F3@ucsd.edu \
--to=bug-gnu-emacs@gnu.org \
--cc=59455@debbugs.gnu.org \
--cc=theo@thornhill.no \
--cc=yuf011@ucsd.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.