lispyville
lispyville copied to clipboard
"atom-end" motions are offset to the right
;; Aa B Cc
(peanut butter sandwich)
With the cursor on A and the atom-movement theme enabled, pressing "E" and "gE" should bring the cursor to C and A respectively, but it ends up being offset one character to the right (c and a).
Also the backward-atom-end function is missing a let-block for orig-pos
variable.
It might not be the most elegant solution, but I fixed the behaviour by simply adding (forward-char -1)
at the end of the functions and :type inclusive
to keep dE, cE working as expected.
(evil-define-motion lispyville-forward-atom-end (count)
"Go to the next atom or comment end COUNT times."
+ :type inclusive
(or count (setq count 1))
+ (forward-char 1)
(if (< count 0))
...
- (cl-return))))))
+ (cl-return))))
+ (forward-char -1)))
If this is alright (still haven't figured out how to run the tests properly) I could submit a simple PR :) Thanks!