emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/evil e408ec8b3d: Add `evil-goto-last-change` & reverse, ta


From: ELPA Syncer
Subject: [nongnu] elpa/evil e408ec8b3d: Add `evil-goto-last-change` & reverse, taking count arg
Date: Thu, 11 Aug 2022 15:58:20 -0400 (EDT)

branch: elpa/evil
commit e408ec8b3d7fcc5e70b1b43598db2c8ba71b88b1
Author: Tom Dalziel <tom_dl@hotmail.com>
Commit: Tom Dalziel <33435574+tomdl89@users.noreply.github.com>

    Add `evil-goto-last-change` & reverse, taking count arg
    
    Fixes #1639
---
 evil-commands.el | 12 ++++++++++++
 evil-maps.el     |  4 ++--
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/evil-commands.el b/evil-commands.el
index 072f805b94..b0a4fa1158 100644
--- a/evil-commands.el
+++ b/evil-commands.el
@@ -882,6 +882,18 @@ Columns are counted from zero."
   (evil-goto-mark char noerror)
   (evil-first-non-blank))
 
+(evil-define-motion evil-goto-last-change (count)
+  "Like `goto-last-change' but takes a COUNT rather than a span."
+  (setq this-command 'goto-last-change)
+  (dotimes (_ (or count 1))
+    (goto-last-change nil)))
+
+(evil-define-motion evil-goto-last-change-reverse (count)
+  "Like `goto-last-change-reverse' but takes a COUNT rather than a span."
+  (setq this-command 'goto-last-change-reverse)
+  (dotimes (_ (or count 1))
+    (goto-last-change-reverse nil)))
+
 (evil-define-motion evil-jump-backward (count)
   "Go to older position in jump list.
 To go the other way, press \
diff --git a/evil-maps.el b/evil-maps.el
index 5c7a5948ad..63f52f9eb6 100644
--- a/evil-maps.el
+++ b/evil-maps.el
@@ -110,8 +110,8 @@
 (define-key evil-normal-state-map [remap yank-pop] 'evil-paste-pop)
 
 ;; go to last change
-(define-key evil-normal-state-map "g;" 'goto-last-change)
-(define-key evil-normal-state-map "g," 'goto-last-change-reverse)
+(define-key evil-normal-state-map "g;" 'evil-goto-last-change)
+(define-key evil-normal-state-map "g," 'evil-goto-last-change-reverse)
 
 ;; undo
 (define-key evil-normal-state-map "u" 'evil-undo)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]