Skip to content

Commit

Permalink
feat: Move folding only inside range
Browse files Browse the repository at this point in the history
  • Loading branch information
jcs090218 committed May 20, 2024
1 parent 298d82e commit 26b9c3b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions vs-edit-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -436,8 +436,10 @@
(defun vs-edit-close-node ()
"Close the current scope of the node."
(interactive)
(when-let ((ov (or (vs-edit--close-node) (ts-fold-close))))
(goto-char (overlay-start ov))))
(when-let* ((ov (or (vs-edit--close-node) (ts-fold-close)))
(beg (overlay-start ov))
((< beg (point))))
(goto-char beg)))

;;;###autoload
(defun vs-edit-open-node ()
Expand Down

0 comments on commit 26b9c3b

Please sign in to comment.