|
From: | Stefan Monnier |
Subject: | bug#66732: tree-sitter fontification doesn't update multi-line syntax reliably |
Date: | Sat, 16 Dec 2023 14:57:04 -0500 |
User-agent: | Gnus/5.13 (Gnus v5.13) |
> +(defun treesit--pre-redisplay (&rest _) > + (treesit-update-ranges) > + (dolist (parser (treesit-parser-list nil nil t)) > + (treesit-parser-root-node parser))) Note that `pre-redisplay-functions` is called often and can be called N times for a single redisplay (if the buffer is displayed in N windows), so we should try and make sure we only do the hard work if there's actually been a change since the last time. [ And the code should probably come with a comment explaining why calling `treesit-parser-root-node` and ignoring its return value is useful here. ] Stefan
[Prev in Thread] | Current Thread | [Next in Thread] |