branch: elpa/aidermacs
commit 50e26da76189ca09fa60240c47993c694e1e1ef4
Merge: b4f88b8c5e 5b0244ef00
Author: Matthew Zeng <[email protected]>
Commit: GitHub <[email protected]>
Merge pull request #49 from xplutoy/main
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))))