From 8552474a0b2811e87cd6199bc68bd2679336620b Mon Sep 17 00:00:00 2001 From: jao Date: Sun, 22 Jan 2023 20:33:33 +0000 Subject: eat: fix for active term tracking --- init.el | 8 ++++---- 1 file 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 -- cgit v1.2.3