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

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

[nongnu] elpa/evil-exchange 548393cb16 44/46: Always inhibit operator co


From: ELPA Syncer
Subject: [nongnu] elpa/evil-exchange 548393cb16 44/46: Always inhibit operator code when canceling an exchange.
Date: Thu, 6 Jan 2022 03:59:53 -0500 (EST)

branch: elpa/evil-exchange
commit 548393cb1603b3ab52fd291e9687d2be0d4f022f
Author: Trevor Murphy <trevormurphy@google.com>
Commit: Trevor Murphy <trevormurphy@google.com>

    Always inhibit operator code when canceling an exchange.
    
    When `evil-exchange` is triggered through the `cx` keybinding, and
    then canceled with `c`, this function runs and eventually evil treats
    the result as a trivial motion to pass through to the rest of the
    operator code.
    
    Since we're canceling the exchange, we never want the rest of the
    `evil-exchange` code to run, so we have to explicitly cancel it here.
---
 evil-exchange.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/evil-exchange.el b/evil-exchange.el
index 5310f1696b..654ba977d0 100644
--- a/evil-exchange.el
+++ b/evil-exchange.el
@@ -169,6 +169,8 @@
 (defun evil-exchange-cancel ()
   "Cancel current pending exchange."
   (interactive)
+  (when evil-this-operator
+    (setq evil-inhibit-operator t))
   (if (null evil-exchange--position)
       (message "No pending exchange")
     (evil-exchange--clean)



reply via email to

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