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

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

[nongnu] elpa/evil-escape 67843e9dd4 041/133: Fix recursive `f` input du


From: ELPA Syncer
Subject: [nongnu] elpa/evil-escape 67843e9dd4 041/133: Fix recursive `f` input during isearch in certain buffers
Date: Wed, 3 Jan 2024 21:59:51 -0500 (EST)

branch: elpa/evil-escape
commit 67843e9dd4518fba8aa8a26170653a94a7a1c27d
Author: syl20bnr <sylvain.benner@gmail.com>
Commit: syl20bnr <sylvain.benner@gmail.com>

    Fix recursive `f` input during isearch in certain buffers
---
 evil-escape.el | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/evil-escape.el b/evil-escape.el
index a3fe358944..07ece6271e 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.12
+;; Version: 2.13
 ;; Package-Requires: ((emacs "24") (evil "1.0.9"))
 ;; URL: https://github.com/syl20bnr/evil-escape
 
@@ -303,13 +303,15 @@ the underlying major or minor modes map.
 Once the command KEY passed through MAP the function HFUNC is removed
 from the `post-command-hook'."
   (if (lookup-key map key)
+      ;; first pass
       (define-key map key nil)
+    ;; second pass
     (let ((escape-func (evil-escape--escape-function-symbol from)))
       (define-key map key escape-func)
       (remove-hook 'post-command-hook hfunc))))
 
 (defun evil-escape--emacs-state-passthrough ()
-  "Allow next command KEY to pass through `evil-emcs-state-map'"
+  "Allow next command KEY to pass through `evil-emacs-state-map'"
   (evil-escape--passthrough "emacs-state"
                             (evil-escape--first-key)
                             evil-emacs-state-map
@@ -319,9 +321,11 @@ from the `post-command-hook'."
   "Setup a pass through for emacs state map"
   (when (eq 'emacs evil-state)
     (add-hook 'post-command-hook 'evil-escape--emacs-state-passthrough)
-    (setq unread-command-events
-          (append unread-command-events (listify-key-sequence
-                                         (evil-escape--first-key))))))
+    (unless (or (and (boundp 'isearch-mode) (symbol-value 'isearch-mode))
+                (minibufferp))
+      (setq unread-command-events
+            (append unread-command-events (listify-key-sequence
+                                           (evil-escape--first-key)))))))
 
 (defun evil-escape--escape
     (keys callback &optional shadowed-func insert-func delete-func)
@@ -361,5 +365,3 @@ DELETE-FUNC when calling CALLBACK. "
         (evil-escape--execute-shadowed-func shadowed-func))))))
 
 (provide 'evil-escape)
-
-;;; evil-escape.el ends here



reply via email to

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