* lisp/treesit.el (treesit-indent-region): Handle markers (bug#77077).
Ensure that markers are converted to integers for 'beg' and 'end'.
This commit is contained in:
parent
1364bbc6a5
commit
84abd43f42
1 changed files with 2 additions and 0 deletions
|
@ -2010,6 +2010,8 @@ reparse after indenting every single line.")
|
|||
(defun treesit-indent-region (beg end)
|
||||
"Indent the region between BEG and END.
|
||||
Similar to `treesit-indent', but indent a region instead."
|
||||
(when (markerp beg) (setq beg (marker-position beg)))
|
||||
(when (markerp end) (setq end (marker-position end)))
|
||||
(treesit-update-ranges beg end)
|
||||
;; We indent `treesit--indent-region-batch-size' lines at a time, to
|
||||
;; reduce the number of times the parser needs to re-parse. In each
|
||||
|
|
Loading…
Add table
Reference in a new issue