From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#66732: tree-sitter fontification doesn't update multi-line syntax reliably Date: Sun, 29 Oct 2023 14:22:30 +0200 Message-ID: <83fs1tbou1.fsf@gnu.org> References: <878r7s5cdf.fsf@honnef.co> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27672"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 66732@debbugs.gnu.org, dominik@honnef.co To: Dmitry Gutov , Yuan Fu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Oct 29 13:23:43 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qx4pT-00073S-00 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 29 Oct 2023 13:23:43 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qx4pH-0006Hm-8V; Sun, 29 Oct 2023 08:23:31 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qx4pF-0006HW-VJ for bug-gnu-emacs@gnu.org; Sun, 29 Oct 2023 08:23:30 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qx4pF-0007rC-N7 for bug-gnu-emacs@gnu.org; Sun, 29 Oct 2023 08:23:29 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qx4pm-0000vw-7c for bug-gnu-emacs@gnu.org; Sun, 29 Oct 2023 08:24:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 29 Oct 2023 12:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66732 X-GNU-PR-Package: emacs Original-Received: via spool by 66732-submit@debbugs.gnu.org id=B66732.16985822073525 (code B ref 66732); Sun, 29 Oct 2023 12:24:02 +0000 Original-Received: (at 66732) by debbugs.gnu.org; 29 Oct 2023 12:23:27 +0000 Original-Received: from localhost ([127.0.0.1]:40658 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qx4pD-0000um-0Z for submit@debbugs.gnu.org; Sun, 29 Oct 2023 08:23:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45406) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qx4pA-0000uY-N6 for 66732@debbugs.gnu.org; Sun, 29 Oct 2023 08:23:25 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qx4oY-0007mB-GJ; Sun, 29 Oct 2023 08:22:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=xTyOkfPo4HMgnBzszQEz1pbBMgoVYVQHey1SwvIZDn4=; b=D17d/R/uuJTX wFIvXp373oLNej6lKn25+yNBvI3VrmcknLLkZTIQz9tCs43liooAU+gJghQQQOVmoVznsjhufccIU th346vqdq+cwiJaB2qJRkdl0KgnXQMaeQdLIpHWo0I4E9l+CIuDUjiOwD03o3qJ7EYcr1xHWoLyS3 +nwdCVHt0sASsR1lG8YGs2YFxFVfGmYpGXAEhb1VkHX//kbunHVTEqMeYoRqIcoR0BSM138RCZ0vu U3Ym7sueYIpBiIn2bQ/ep4BkxSNjRWt+R++5daXjjyXDFDJEofZJphMivLe9P5xCmSk1EmsCHXBHp QDEFTP3hB+fL7AjqOOe05Q==; In-Reply-To: (message from Dmitry Gutov on Wed, 25 Oct 2023 02:15:30 +0300) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:273501 Archived-At: > Date: Wed, 25 Oct 2023 02:15:30 +0300 > From: Dmitry Gutov > > Hi Dominik, > > On 24/10/2023 17:22, Dominik Honnef wrote: > > Steps to reproduce: > > > > 1. Start emacs -q > > 2. Clear the scratch buffer > > 3. Switch to c-ts-mode > > 4. Type the following: > > > > /* foo > > bar > > baz > > */ > > > > Notice the following: > > > > 1. tree-sitter will not parse the buffer contents as a comment until the > > closing comment marker is typed (not an issue per se.) > > > > 2. When you type the closing comment marker, only that line will be > > fontified. > > > > 3. Moving to the previous line will refontify the whole comment. > > > > Similarly, removing the closing comment marker will not instantly > > refontify the buffer, either. > > > > The expected behavior would be for the whole comment to be refontified > > immediately after typing the closing comment marker. > > > > Other buffer contents often lead to even worse refontifying, where even > > motion will not fix things. > > Can repro. > > Only with 'emacs -Q', though (note to others who will try). Yuan, any ideas or comments?