Skip to content

Commit

Permalink
Declare goto-char as a motion, fix evil-goto-char
Browse files Browse the repository at this point in the history
Tests added for evil-goto-char. Fixes #1852
  • Loading branch information
tomdl89 committed Dec 25, 2023
1 parent fc6bd00 commit 2bd0cea
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion evil-commands.el
Original file line number Diff line number Diff line change
Expand Up @@ -4270,7 +4270,7 @@ range. The given argument is passed straight to
(evil-force-normal-state)
(set-marker marker nil)))))

(evil-define-command evil-goto-char (position)
(evil-define-motion evil-goto-char (position)
"Go to POSITION in the buffer.
Default position is the beginning of the buffer."
:jump t
Expand Down
4 changes: 3 additions & 1 deletion evil-tests.el
Original file line number Diff line number Diff line change
Expand Up @@ -3704,7 +3704,9 @@ Below some empty line"))
("go")
"[W]e only need a short buffer for this test"
(evil-goto-char 24)
"We only need a short bu[f]fer for this test"))
"We only need a short bu[f]fer for this test"
("v29go")
"We only need a short bu<ffer [f]>or this test"))

(ert-deftest evil-test-operator-0 ()
"Test motion \"0\" with an operator."
Expand Down
1 change: 1 addition & 0 deletions evil-vars.el
Original file line number Diff line number Diff line change
Expand Up @@ -1030,6 +1030,7 @@ intercepted."
forward-sentence
forward-sexp
forward-word
goto-char
goto-last-change
ibuffer-backward-line
ibuffer-forward-line
Expand Down

0 comments on commit 2bd0cea

Please sign in to comment.