unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#64329: 29.0.92; treesit/fill-paragraph syntax highlighting problem
@ 2023-06-28 16:46 Troy Brown
  2023-06-28 21:23 ` Yuan Fu
  0 siblings, 1 reply; 6+ messages in thread
From: Troy Brown @ 2023-06-28 16:46 UTC (permalink / raw)
  To: 64329

I've noticed this problem on multiple tree-sitter major modes including
c-ts-mode, c++-ts-mode, java-ts-mode, bash-ts-mode.  I haven't tried
others, but I suspect those might also suffer from this problem.

The issue occurs when attempting to fill the paragraph of a comment
block.  The following comment block can be used as an example to
reproduce the problem and happens with "emacs -Q" (assuming
corresponding tree-sitter libraries are available).

--8<---------------cut here---------------start------------->8---
// The quick brown fox jumps over the
// lazy dog.
// The quick brown fox jumps over the lazy dog.
--8<---------------cut here---------------end--------------->8---

Switch to one of the tree-sitter modes (e.g., M-x java-ts-mode).  Move
point to the first line of the comment block above and then execute the
fill-paragraph command (i.e., M-q).

The text which is wrapped onto the first line of the comment block will
be highlighted incorrectly.  The results appear as if the comment
delimiter was removed, fontification occurred, then the text was moved
to the first line of the comment block and never refontified with the
comment face.





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-06-29 18:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-28 16:46 bug#64329: 29.0.92; treesit/fill-paragraph syntax highlighting problem Troy Brown
2023-06-28 21:23 ` Yuan Fu
2023-06-29  0:17   ` Yuan Fu
2023-06-29  5:22     ` Eli Zaretskii
2023-06-29 18:17       ` Yuan Fu
2023-06-29  5:10   ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).