diff options
author | Yuan Fu <casouri@gmail.com> | 2022-06-13 13:22:17 -0700 |
---|---|---|
committer | Yuan Fu <casouri@gmail.com> | 2022-06-13 14:20:25 -0700 |
commit | a73f2b9990465820d80c58ed25208b72731d410d (patch) | |
tree | f2f71d7a80d6ca1c47ebe3d17e3bab44ade90925 /src/lisp.h | |
parent | c5b172ec586fa5ed0ae0644e1760fcf7ef27dd02 (diff) | |
download | emacs-a73f2b9990465820d80c58ed25208b72731d410d.tar.gz emacs-a73f2b9990465820d80c58ed25208b72731d410d.tar.bz2 emacs-a73f2b9990465820d80c58ed25208b72731d410d.zip |
Fix treesit-search-forward
Move the check for movement
(if (> arg 0)
;; Make sure we moved forward.
(> (funcall pos-fn node) starting-point)
;; Make sure we moved backward.
(< (funcall pos-fn node) starting-point))
into cl-loop:
if (treesit-node-eq cap-node node)
becomes
if (and (treesit-node-eq cap-node node)
(if (> arg 0)
;; Make sure we moved forward.
(> (funcall pos-fn node)
starting-point)
;; Make sure we moved backward.
(< (funcall pos-fn node)
starting-point)))
* lisp/treesit.el (treesit-search-forward): Move the check.
Diffstat (limited to 'src/lisp.h')
0 files changed, 0 insertions, 0 deletions