tools/eshell: fix split-window behavior not burying eshell
This happens when there is no other buffer to replace it with.
This commit is contained in:
parent
8c053fcfa5
commit
6bfac0ada2
1 changed files with 6 additions and 2 deletions
|
@ -169,19 +169,23 @@ delete."
|
|||
(eshell-life-is-too-much)
|
||||
(delete-char arg)))
|
||||
|
||||
(defsubst +eshell--bury-buffer ()
|
||||
(unless (switch-to-prev-buffer nil 'bury)
|
||||
(switch-to-buffer (doom-fallback-buffer))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +eshell/split-below ()
|
||||
"Create a new eshell window below the current one."
|
||||
(interactive)
|
||||
(select-window (split-window-vertically))
|
||||
(bury-buffer))
|
||||
(+eshell--bury-buffer))
|
||||
|
||||
;;;###autoload
|
||||
(defun +eshell/split-right ()
|
||||
"Create a new eshell window to the right of the current one."
|
||||
(interactive)
|
||||
(select-window (split-window-horizontally))
|
||||
(bury-buffer))
|
||||
(+eshell--bury-buffer))
|
||||
|
||||
;; `make-ring'
|
||||
;; `ring-ref'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue