From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dominik Honnef Newsgroups: gmane.emacs.bugs Subject: bug#66732: tree-sitter fontification doesn't update multi-line syntax reliably Date: Tue, 24 Oct 2023 16:22:20 +0200 Message-ID: <878r7s5cdf.fsf@honnef.co> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31885"; mail-complaints-to="usenet@ciao.gmane.io" To: 66732@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Oct 24 20:01:59 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 1qvLj5-00086r-Eg for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 24 Oct 2023 20:01:59 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qvLim-00015n-9U; Tue, 24 Oct 2023 14:01:40 -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 1qvLif-00011t-5E for bug-gnu-emacs@gnu.org; Tue, 24 Oct 2023 14:01:34 -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 1qvLie-0002Hq-N7 for bug-gnu-emacs@gnu.org; Tue, 24 Oct 2023 14:01:32 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qvLj8-0007xN-38 for bug-gnu-emacs@gnu.org; Tue, 24 Oct 2023 14:02:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dominik Honnef Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 24 Oct 2023 18:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 66732 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.169817051830572 (code B ref -1); Tue, 24 Oct 2023 18:02:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 24 Oct 2023 18:01:58 +0000 Original-Received: from localhost ([127.0.0.1]:56559 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qvLj2-0007x0-CH for submit@debbugs.gnu.org; Tue, 24 Oct 2023 14:01:58 -0400 Original-Received: from lists.gnu.org ([2001:470:142::17]:46820) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qvIJI-0007Xm-N9 for submit@debbugs.gnu.org; Tue, 24 Oct 2023 10:23:12 -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 1qvIId-0000Lt-EA for bug-gnu-emacs@gnu.org; Tue, 24 Oct 2023 10:22:30 -0400 Original-Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qvIIb-0007ub-P2 for bug-gnu-emacs@gnu.org; Tue, 24 Oct 2023 10:22:27 -0400 Original-Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-4081ccf69dcso31898495e9.0 for ; Tue, 24 Oct 2023 07:22:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=honnef-co.20230601.gappssmtp.com; s=20230601; t=1698157343; x=1698762143; darn=gnu.org; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=TR7QwBw/zN0pOgK9vHEf43ztNnif6ALHKzW01SJTvlg=; b=SSI7MJBaWkO8YERVnka50j1CB3SUm/d/rBPweeU9nSTB+39O64j6SrVdHqu51qK/YM 0XSt/uqUMpxk49DIR3OBqG+nBy0DrlbnU8kE/j2pSPPuN3ZiQgKor/F848OYzN1vuapN SAR7bdU7LYa6vlXwSCq2naS5AuTsILg3Hekwbti9MMzWYJPpl9dNTAf5g05hFpCbH9HV UVbt4AVpZWnFhyKFQ1Zy6TwikchT3/cE6GMrYmB/EsDK/3hTYXx/Clt36tfsfwJk8na6 IjQ6thJN+/fpTOdMUJqdS6kup78zqDlGu/x19SDoirXnZkSBN9vwmYrj++s3UVZz0ih5 mNWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698157343; x=1698762143; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=TR7QwBw/zN0pOgK9vHEf43ztNnif6ALHKzW01SJTvlg=; b=mrKs/eX/8KF+lutcAQMKN6s2Fpzk5XyF5W0EjuvlFPh8BLYSwglZzL/DHjJ0PilS8n zf62dobIKGnsxu/gYiOAnwfLwSSFPbq6L/kI05XrOjBYiu4s5WjfN/t8Teot3TGRFzJc FdS+6kcbmVBvbVppSQ0VcCgtdQs/5a/DHfkZ86Xj9//TWsa6qWld90gLsjfJsd4wB/10 QDcgCgCsEG6EOkb+aNe6LdxOAadZerKRgK8ooqSEGRsPlsQSsZ0zBEACMHI1rtuOlUaq TeDlkrVHaf0zEgjbFzUo/aHUS4CYZr/Bktu7aRTZ3p2NGshrhgzx0opVVSiQ3ibYM2Fc TgLA== X-Gm-Message-State: AOJu0YwIAIbIimsNG/V2zUHl5GDPDY6V1ZXl8QAYnrIkV0YNAUFtAQx8 8kkz3zwfEgSgUsHu++t4/zGQWRopVMgSMb58zQg= X-Google-Smtp-Source: AGHT+IHR6GipWgQTMUtn1U7sY/j8yaiczTAVSo9woJtmfZKI62qizDnrbhVNMWoaNYPzMLeosEzvrg== X-Received: by 2002:adf:f043:0:b0:32c:d29c:2f77 with SMTP id t3-20020adff043000000b0032cd29c2f77mr11704363wro.1.1698157343568; Tue, 24 Oct 2023 07:22:23 -0700 (PDT) Original-Received: from localhost (ip-176-199-155-051.um44.pools.vodafone-ip.de. [176.199.155.51]) by smtp.gmail.com with ESMTPSA id h13-20020a5d548d000000b0032dbf99bf4fsm9971915wrv.89.2023.10.24.07.22.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 07:22:22 -0700 (PDT) Received-SPF: none client-ip=2a00:1450:4864:20::335; envelope-from=dominik@honnef.co; helo=mail-wm1-x335.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 24 Oct 2023 14:01:55 -0400 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:273117 Archived-At: 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.