From 2bd0cea01a5feceb376242b29830370954a45f55 Mon Sep 17 00:00:00 2001 From: Tom Dalziel Date: Mon, 25 Dec 2023 16:02:14 +0000 Subject: [PATCH] Declare goto-char as a motion, fix evil-goto-char Tests added for evil-goto-char. Fixes #1852 --- evil-commands.el | 2 +- evil-tests.el | 4 +++- evil-vars.el | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/evil-commands.el b/evil-commands.el index 44306c36..6bd90af0 100644 --- a/evil-commands.el +++ b/evil-commands.el @@ -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 diff --git a/evil-tests.el b/evil-tests.el index f3c85055..84a779e2 100644 --- a/evil-tests.el +++ b/evil-tests.el @@ -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 buor this test")) (ert-deftest evil-test-operator-0 () "Test motion \"0\" with an operator." diff --git a/evil-vars.el b/evil-vars.el index 915407e2..aea7eeea 100644 --- a/evil-vars.el +++ b/evil-vars.el @@ -1030,6 +1030,7 @@ intercepted." forward-sentence forward-sexp forward-word + goto-char goto-last-change ibuffer-backward-line ibuffer-forward-line