Only clean up after eshell window if visible
Killing buried eshell windows shouldn't delete windows or restore any wconfs.
This commit is contained in:
parent
dc8c01f17f
commit
7bb9adc6bd
1 changed files with 13 additions and 12 deletions
|
@ -259,16 +259,17 @@ delete."
|
|||
"Close window (or workspace) on quit."
|
||||
(let ((buf (current-buffer)))
|
||||
(when (+eshell--remove-buffer buf)
|
||||
(+eshell--setup-window (get-buffer-window buf) nil)
|
||||
(cond ((and (one-window-p)
|
||||
(when-let* ((win (get-buffer-window buf)))
|
||||
(+eshell--setup-window win nil)
|
||||
(cond ((and (one-window-p t)
|
||||
(window-configuration-p (frame-parameter nil 'saved-wconf)))
|
||||
(set-window-configuration (frame-parameter nil 'saved-wconf))
|
||||
(set-frame-parameter nil 'saved-wconf nil))
|
||||
(set-frame-parameter win 'saved-wconf nil))
|
||||
((one-window-p)
|
||||
(let ((prev (save-window-excursion (previous-buffer))))
|
||||
(unless (and prev (doom-real-buffer-p prev))
|
||||
(switch-to-buffer (doom-fallback-buffer)))))
|
||||
((or (and (fboundp '+popup-window-p) (+popup-window-p))
|
||||
+eshell-kill-window-on-exit)
|
||||
(delete-window))))))
|
||||
(delete-window win)))))))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue