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

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

[nongnu] elpa/evil-escape 0da35398ed 058/133: Fix support for operators


From: ELPA Syncer
Subject: [nongnu] elpa/evil-escape 0da35398ed 058/133: Fix support for operators
Date: Wed, 3 Jan 2024 21:59:52 -0500 (EST)

branch: elpa/evil-escape
commit 0da35398edaddf4343dd87c301949218aaa7f2dc
Author: sbenner <sylvain.benner@ubisoft.com>
Commit: sbenner <sylvain.benner@ubisoft.com>

    Fix support for operators
    
    Fixes:
    `vfa` works and highlights to the next a
    `dfa` doesn't work; deletes character at point and then moves to the a
---
 evil-escape.el | 28 +++++++++++++++-------------
 1 file changed, 15 insertions(+), 13 deletions(-)

diff --git a/evil-escape.el b/evil-escape.el
index 763e4969f7..e0d7ead93c 100644
--- a/evil-escape.el
+++ b/evil-escape.el
@@ -5,7 +5,7 @@
 ;; Author: Sylvain Benner <sylvain.benner@gmail.com>
 ;; Keywords: convenience editing evil
 ;; Created: 22 Oct 2014
-;; Version: 2.24
+;; Version: 2.25
 ;; Package-Requires: ((emacs "24") (evil "1.0.9"))
 ;; URL: https://github.com/syl20bnr/evil-escape
 
@@ -172,18 +172,20 @@ with a key sequence."
          (evil-define-motion ,(evil-escape--escape-function-symbol from)
            (count)
            ,@evil-func-props
-           (if (and (called-interactively-p 'interactive)
-                    (not (memq major-mode evil-escape-excluded-major-modes)))
-               ;; called by the user
-               (evil-escape--escape ,from
-                                    ',map
-                                    ,evil-escape-key-sequence
-                                    ',command
-                                    ',shadowed-func
-                                    ',insert-func
-                                    ',delete-func)
-             ;; not called by the user (i.e. via a macro)
-             (evil-escape--setup-passthrough ,from ',map ',shadowed-func)))))))
+           (if (eq 'operator evil-state)
+               (call-interactively ',shadowed-func)
+             (if (and (called-interactively-p 'interactive)
+                      (not (memq major-mode evil-escape-excluded-major-modes)))
+                 ;; called by the user
+                 (evil-escape--escape ,from
+                                      ',map
+                                      ,evil-escape-key-sequence
+                                      ',command
+                                      ',shadowed-func
+                                      ',insert-func
+                                      ',delete-func)
+               ;; not called by the user (i.e. via a macro)
+               (evil-escape--setup-passthrough ,from ',map 
',shadowed-func))))))))
 
 (defun evil-escape--define-keys ()
   "Set the key bindings to escape _everything!_"



reply via email to

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