diff options
| author | Axel Forsman <axel@axelf.se> | 2025-02-26 18:47:55 +0100 |
|---|---|---|
| committer | Axel Forsman <axel@axelf.se> | 2025-02-27 19:31:51 +0100 |
| commit | ad3e95f6e3253ddf2d33377ebbff7c82082ab75a (patch) | |
| tree | 49bc46b3e0ac8c656cc071d989e97789add0d0ba /evil-common.el | |
| parent | 5cc78bb22533482fdd5905f10950408156eb40a1 (diff) | |
Fix g$ putting cursor on start of next visual line
Normal mode "g$" put the cursor on the start of the next visual line
instead of the end of the current one.
Fixes #1244, fixes #1963
Diffstat (limited to 'evil-common.el')
| -rw-r--r-- | evil-common.el | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/evil-common.el b/evil-common.el index f7df526..aaeb8e1 100644 --- a/evil-common.el +++ b/evil-common.el @@ -1237,6 +1237,7 @@ If STATE is given it used a parsing state at point." ;; further, those motions move point to the beginning resp. the end of ;; the line (we never want point to leave its column). The code here ;; comes from simple.el, and I hope it will work in future. +(declare-function evil-end-of-visual-line "evil-commands") (defun evil-line-move (count &optional noerror) "Like `line-move' but conserves the column. Signal an error at buffer boundaries unless NOERROR is non-nil." @@ -1250,7 +1251,7 @@ Signal an error at buffer boundaries unless NOERROR is non-nil." (if (and line-move-visual (eq temporary-goal-column most-positive-fixnum) (memq last-command '(next-line previous-line))) - (let (temporary-goal-column) (end-of-visual-line (1+ count))) + (let (temporary-goal-column) (evil-end-of-visual-line (1+ count))) (condition-case err (line-move count) ((beginning-of-buffer end-of-buffer) |
