Fix doom/kill-buried-buffer closing windows
By making doom/kill-all-buffers less gung ho about deleting windows when the buffer list is empty.
This commit is contained in:
parent
88af741597
commit
24b336322c
1 changed files with 10 additions and 9 deletions
|
@ -283,15 +283,16 @@ belong to the current project."
|
|||
(doom-project-buffer-list)
|
||||
(doom-buffer-list))
|
||||
t))
|
||||
(if (null buffer-list)
|
||||
(message "No buffers to kill")
|
||||
(save-some-buffers)
|
||||
(delete-other-windows)
|
||||
(when (memq (current-buffer) buffer-list)
|
||||
(switch-to-buffer (doom-fallback-buffer)))
|
||||
(mapc #'kill-buffer buffer-list)
|
||||
(mapc #'doom-kill-buffer-and-windows buffer-list)
|
||||
(when interactive
|
||||
(message "Killed %s buffers"
|
||||
(- (length buffer-list)
|
||||
(length (cl-remove-if-not #'buffer-live-p buffer-list))))))
|
||||
(length (cl-remove-if-not #'buffer-live-p buffer-list)))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom/kill-other-buffers (&optional buffer-list interactive)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue