branch: elpa/aidermacs commit 5b0244ef0089eb02dc90f960ce69d3242c52ce66 Author: yx <yangxue...@foxmail.com> Commit: yx <yangxue...@foxmail.com>
fix: the aider process may had been killed --- aidermacs.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/aidermacs.el b/aidermacs.el index 60e72ad4ca..9c3936c12d 100644 --- a/aidermacs.el +++ b/aidermacs.el @@ -284,10 +284,11 @@ This function sets up the appropriate arguments and launches the process." (when aidermacs-subtree-only '("--subtree-only"))))) (final-args (append backend-args flat-extra-args))) - (if (get-buffer buffer-name) + (if (and (get-buffer buffer-name) + (process-live-p (get-buffer-process buffer-name))) (aidermacs-switch-to-buffer buffer-name) (aidermacs-run-backend aidermacs-program final-args buffer-name) - (with-current-buffer (get-buffer buffer-name) + (with-current-buffer buffer-name ;; Set initial mode based on startup configuration (setq-local aidermacs--current-mode (if aidermacs-use-architect-mode 'architect 'code))) (aidermacs-switch-to-buffer buffer-name))))