Prevent eshell from switching to existing eshell

Prevent duplicate eshell buffers as a result of quitting a second eshell
buffer.
This commit is contained in:
Henrik Lissner 2018-06-30 02:12:09 +02:00
parent d402c6ef44
commit e9c97d7ad0
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -24,6 +24,8 @@
(defun +eshell--bury-buffer (&optional dedicated-p) (defun +eshell--bury-buffer (&optional dedicated-p)
(unless (switch-to-prev-buffer nil 'bury) (unless (switch-to-prev-buffer nil 'bury)
(switch-to-buffer (doom-fallback-buffer))) (switch-to-buffer (doom-fallback-buffer)))
(when (eq major-mode 'eshell-mode)
(switch-to-buffer (doom-fallback-buffer)))
(when +eshell-enable-new-shell-on-split (when +eshell-enable-new-shell-on-split
(when-let* ((win (get-buffer-window (+eshell/open t)))) (when-let* ((win (get-buffer-window (+eshell/open t))))
(set-window-dedicated-p win dedicated-p)))) (set-window-dedicated-p win dedicated-p))))