treesit--pre-syntax-ppss: Fix args-out-of-range in internal--syntax-propertize

* lisp/treesit.el (treesit--pre-syntax-ppss): Make sure the lower
bound is still within the current restriction (bug#67977).
This commit is contained in:
Dmitry Gutov 2024-01-02 15:32:03 +02:00
parent dc4e6b1329
commit 1a677d1429

View file

@ -1150,7 +1150,7 @@ START and END mark the current to-be-propertized region."
(if (and new-start (< new-start start))
(progn
(setq treesit--syntax-propertize-start nil)
(cons new-start end))
(cons (max new-start (point-min)) end))
nil)))
;;; Indent