all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Troy Brown <brownts@troybrown.dev>
To: 64329@debbugs.gnu.org
Subject: bug#64329: 29.0.92; treesit/fill-paragraph syntax highlighting problem
Date: Wed, 28 Jun 2023 12:46:04 -0400	[thread overview]
Message-ID: <CABvCZ40=028FgO0gN8t4+dMd25vHozrf5kcLJe53n+V=v3KoaA@mail.gmail.com> (raw)

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.





             reply	other threads:[~2023-06-28 16:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-28 16:46 Troy Brown [this message]
2023-06-28 21:23 ` bug#64329: 29.0.92; treesit/fill-paragraph syntax highlighting problem 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

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='CABvCZ40=028FgO0gN8t4+dMd25vHozrf5kcLJe53n+V=v3KoaA@mail.gmail.com' \
    --to=brownts@troybrown.dev \
    --cc=64329@debbugs.gnu.org \
    /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.