From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#66732: tree-sitter fontification doesn't update multi-line syntax reliably Date: Wed, 25 Oct 2023 02:15:30 +0300 Message-ID: References: <878r7s5cdf.fsf@honnef.co> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33880"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 To: Dominik Honnef , 66732@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Oct 25 01:16:54 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 1qvQdo-0008ZA-JC for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 25 Oct 2023 01:16:53 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qvQdW-00071M-74; Tue, 24 Oct 2023 19:16:34 -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 1qvQdU-00071C-KJ for bug-gnu-emacs@gnu.org; Tue, 24 Oct 2023 19:16:32 -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 1qvQdU-00085p-Bz for bug-gnu-emacs@gnu.org; Tue, 24 Oct 2023 19:16:32 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qvQdx-0002W3-Rq for bug-gnu-emacs@gnu.org; Tue, 24 Oct 2023 19:17:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 24 Oct 2023 23:17:01 +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.16981893739602 (code B ref 66732); Tue, 24 Oct 2023 23:17:01 +0000 Original-Received: (at 66732) by debbugs.gnu.org; 24 Oct 2023 23:16:13 +0000 Original-Received: from localhost ([127.0.0.1]:56867 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qvQdA-0002Un-QU for submit@debbugs.gnu.org; Tue, 24 Oct 2023 19:16:13 -0400 Original-Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:34459) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qvQd6-0002UY-O5 for 66732@debbugs.gnu.org; Tue, 24 Oct 2023 19:16:11 -0400 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id A214E3200A58; Tue, 24 Oct 2023 19:15:32 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Tue, 24 Oct 2023 19:15:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1698189332; x=1698275732; bh=ax47Ci0J9Jkdw+ukyPJyJsBTX9t8Kq1EypE haHpgDKs=; b=cH1APn/PVcTmSB4tsm1Unf4anKa3UpmkrorOdepbYwdfDJ8E1RD a8tE4gyB8sgpsQrF9Vkcle6kB+9iVfEQOJc37PQoC9QawGkF27JLf+MHdCcMERqg tgT/xkYhmo/gD1Yr4C1kN3VikPGY3X6YIbVvt+qc667MkAKdtCMJFeIGKfJG7mry 7ood/shN5KNaeE0EtQXPPJHZypdwPme1URSm8vbGjBOUydM5kE3u/6RRC4NCdyiR raOzxUzENDdShMhsHR0VH48SqLGctg9t69NyUjK8wxBxm6NM8r3nTHtYqZMuOGZe FfNlTPvyJAvTDCK0FKEFAhLUdQ3Ia5vJn9A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1698189332; x= 1698275732; bh=ax47Ci0J9Jkdw+ukyPJyJsBTX9t8Kq1EypEhaHpgDKs=; b=p 2roQHraoQpa2EPWXqpHXCF5yGeRZxrWm0uKCRiRHkzoeehTVWEzptmKhsNRkddbr 1U5GwF8BLgSki3QFHxTTgmnbF7qoD/dl4Cv+pNOtBg0AMhCtoSOhyz0taMJWeaVc Y8lH1hqE6pgGXhtIaH81npixkfCcuA0FPDUa+YWd/lW07ICXpjp3tiTtPa1mt14Y ONtkl/QVObUdThkFV2iNoPuhPJSZyrh0mSBaU7dcemmHGjXxvMAXMmjiijPpz4ah JYBHnFPV6Lzd38GXU3tGPZ8l4BU60th5XThcEMmFR8CUYxowPpylw3JNoDjiAnQB bnAqFHNma3JOMkCX73ycg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrkeelgddulecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfhfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffmhhithhr hicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrthhtvg hrnhepgeehtdehudejieetuedttdejkeehjeetueekheffuddtjeeuvdefveeuveeiuddu necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepughmih htrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 24 Oct 2023 19:15:31 -0400 (EDT) Content-Language: en-US In-Reply-To: <878r7s5cdf.fsf@honnef.co> 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:273130 Archived-At: 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).