diff --git a/init.el b/init.el index 662a29a..d9e7609 100644 --- a/init.el +++ b/init.el @@ -206,9 +206,10 @@ Interactively, force the recompile if called with a prefix." (let ((status (kkp--terminal-has-active-kkp-p))) (unwind-protect (progn - (when status (kkp--suspend-in-terminal)) + (when status (kkp--terminal-teardown (kkp--selected-terminal))) (funcall oldfun arg pred)) - (when status (kkp--resume-in-terminal))))) + (when (and status (not (kkp--terminal-has-active-kkp-p))) + (kkp--terminal-setup))))) (advice-add #'save-some-buffers :around #'my/-kkp-fix-save-some-buffers))