mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
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:
@ -169,19 +169,23 @@ delete."
|
|||||||
(eshell-life-is-too-much)
|
(eshell-life-is-too-much)
|
||||||
(delete-char arg)))
|
(delete-char arg)))
|
||||||
|
|
||||||
|
(defsubst +eshell--bury-buffer ()
|
||||||
|
(unless (switch-to-prev-buffer nil 'bury)
|
||||||
|
(switch-to-buffer (doom-fallback-buffer))))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun +eshell/split-below ()
|
(defun +eshell/split-below ()
|
||||||
"Create a new eshell window below the current one."
|
"Create a new eshell window below the current one."
|
||||||
(interactive)
|
(interactive)
|
||||||
(select-window (split-window-vertically))
|
(select-window (split-window-vertically))
|
||||||
(bury-buffer))
|
(+eshell--bury-buffer))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun +eshell/split-right ()
|
(defun +eshell/split-right ()
|
||||||
"Create a new eshell window to the right of the current one."
|
"Create a new eshell window to the right of the current one."
|
||||||
(interactive)
|
(interactive)
|
||||||
(select-window (split-window-horizontally))
|
(select-window (split-window-horizontally))
|
||||||
(bury-buffer))
|
(+eshell--bury-buffer))
|
||||||
|
|
||||||
;; `make-ring'
|
;; `make-ring'
|
||||||
;; `ring-ref'
|
;; `ring-ref'
|
||||||
|
Reference in New Issue
Block a user