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

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

[nongnu] elpa/evil-escape c410d7e977 044/133: Fixes #18 Leaves first key


From: ELPA Syncer
Subject: [nongnu] elpa/evil-escape c410d7e977 044/133: Fixes #18 Leaves first key in multi-term
Date: Wed, 3 Jan 2024 21:59:51 -0500 (EST)

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

    Fixes #18 Leaves first key in multi-term
---
 evil-escape.el | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/evil-escape.el b/evil-escape.el
index 0d166d9943..3f42b3fb55 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.15
+;; Version: 2.16
 ;; Package-Requires: ((emacs "24") (evil "1.0.9"))
 ;; URL: https://github.com/syl20bnr/evil-escape
 
@@ -183,7 +183,7 @@ with a key sequence."
   ;; insert state
   (eval `(evil-escape-define-escape "insert-state" evil-insert-state-map 
evil-normal-state
                                     :insert-func 
evil-escape--insert-state-insert-func
-                                    :delete-func 
evil-escape--default-delete-func))
+                                    :delete-func 
evil-escape--insert-state-delete-func))
   ;; emacs state
   (let ((exit-func (lambda () (interactive)
                      (cond ((string-match "magit" (symbol-name major-mode))
@@ -287,14 +287,17 @@ with a key sequence."
   "Delete char in current buffer if not read only."
   (when (not buffer-read-only) (delete-char -1)))
 
+(defun evil-escape--insert-state-delete-func ()
+  "Take care of term-mode."
+  (interactive)
+  (cond ((eq 'term-mode major-mode)
+         (call-interactively 'term-send-backspace))
+        (t (evil-escape--default-delete-func))))
+
 (defun evil-escape--escape-with-q ()
   "Send `q' key press event to exit from a buffer."
   (setq unread-command-events (listify-key-sequence "q")))
 
-(defun evil-escape--term-insert-func (key)
-  "Insert KEY in current term buffer."
-  (term-send-raw))
-
 (defun evil-escape--execute-shadowed-func (func)
   "Execute the passed FUNC if the context allows it."
   (unless (or (null func)



reply via email to

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