emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/detached 21f17e0be3 2/7: Update detach from session com


From: ELPA Syncer
Subject: [elpa] externals/detached 21f17e0be3 2/7: Update detach from session command
Date: Wed, 5 Oct 2022 12:57:29 -0400 (EDT)

branch: externals/detached
commit 21f17e0be31b0627be279bcbda408f2bd35f8b5f
Author: Niklas Eklund <niklas.eklund@posteo.net>
Commit: Niklas Eklund <niklas.eklund@posteo.net>

    Update detach from session command
    
    Check if the session window is a single window or not. Don't try to
    delete the window if there is only one, Emacs gets sad then.
---
 detached.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/detached.el b/detached.el
index 05a3fc9603..8e5ac5a7ad 100644
--- a/detached.el
+++ b/detached.el
@@ -597,7 +597,9 @@ active session.  For sessions created with 
`detached-compile' or
               (comint-simple-send process detached--dtach-detach-character)
               (message "[detached]"))
             (setq detached--buffer-session nil)
-            (kill-buffer-and-window))
+            (if (= (length (window-list)) 1)
+                (kill-buffer)
+              (kill-buffer-and-window)))
         (if (eq 'active (detached--determine-session-state 
detached--buffer-session))
             ;; `detached-eshell'
             (if-let ((process (and (eq major-mode 'eshell-mode)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]