summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2023-01-22 20:33:33 +0000
committerjao <jao@gnu.org>2023-01-22 20:33:33 +0000
commit8552474a0b2811e87cd6199bc68bd2679336620b (patch)
tree2414bc06cee405abaec80560828d8370527e58b4
parentddebc89afd37d20b2db501a9857c80f0fc0da17b (diff)
downloadelibs-8552474a0b2811e87cd6199bc68bd2679336620b.tar.gz
elibs-8552474a0b2811e87cd6199bc68bd2679336620b.tar.bz2
eat: fix for active term tracking
-rw-r--r--init.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/init.el b/init.el
index 5b36e72..7fc9268 100644
--- a/init.el
+++ b/init.el
@@ -1618,13 +1618,14 @@
(cond ((and jao-use-vterm (fboundp 'jao-exec-in-vterm))
(jao-exec-in-vterm cmd name))
(jao-use-eat (let ((eat-term-name "xterm-256color"))
- (eat cmd t)
- (setq jao-term--cmd cmd)))
+ (with-current-buffer (eat cmd t)
+ (setq-local jao-term--cmd cmd))))
(t (ansi-term "bash" name)
(set-process-sentinel (get-buffer-process (current-buffer))
(lambda (process event)
(when (string= event "finished\n")
(kill-buffer (process-buffer process)))))
+ (setq-local jao-term--cmd cmd)
(term-send-string nil (concat cmd " ; exit\n")))))
(defmacro jao-def-exec-in-term (name cmd &rest prelude)
@@ -1634,8 +1635,7 @@
(let ((jao-use-vterm (if term (not jao-use-vterm) jao-use-vterm)))
(if-let ((b (jao-term--find ,cmd)))
(pop-to-buffer b)
- (jao-exec-in-term ,cmd ,(format "*%s*" name))
- (setq-local jao-term--cmd ,cmd)))))
+ (jao-exec-in-term ,cmd ,(format "*%s*" name))))))
;;;; eshell
;;;;; basic custom