summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Fidler <514778+mattfidler@users.noreply.github.com>2021-11-01 14:41:08 -0500
committerMatthew Fidler <514778+mattfidler@users.noreply.github.com>2021-11-01 14:41:25 -0500
commit739ca23a32f38a035d356b9d8ef8cbeaa8e8702a (patch)
tree157ff84a63b1a62099ad22392a0282c6884a0738
parent683020a92bbcb4a9135f277c6e90a338a49f224e (diff)
Do not send emacs keys when in `term-mode`. Fix #510
-rw-r--r--ergoemacs-mode.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/ergoemacs-mode.el b/ergoemacs-mode.el
index 32a32ea..94b9094 100644
--- a/ergoemacs-mode.el
+++ b/ergoemacs-mode.el
@@ -227,18 +227,22 @@ The TEXT will be what the mode-line is set to be."
(defvar ergoemacs-post-command-hook nil)
(defvar ergeoemacs-mode-term-raw-mode nil)
(defvar ergoemacs-mode-regular nil)
+(defvar ergoemacs-send-keys-term nil)
(defun ergoemacs-post-command-hook ()
"Run `ergoemacs-mode' post command hooks."
(when ergoemacs-mode
(if (and (eq major-mode 'term-mode)
(eq (current-local-map) term-raw-map))
- (setq-local ergoemacs-mode nil
+ (setq-local ergoemacs-mode-regular nil
+ ergoemacs-send-keys-term ergoemacs-mode-send-emacs-keys
+ ergoemacs-mode-send-emacs-keys nil
ergeoemacs-mode-term-raw-mode t)
(run-hooks 'ergoemacs-post-command-hook)))
(when ergeoemacs-mode-term-raw-mode
(when (and (eq major-mode 'term-mode)
(not (eq (current-local-map) term-raw-map)))
- (setq-local ergoemacs-mode t
+ (setq-local ergoemacs-mode-regular t
+ ergoemacs-mode-send-emacs-keys ergoemacs-send-keys-term
ergeoemacs-mode-term-raw-mode nil)
(run-hooks 'ergoemacs-post-command-hook))))