Fix eshell buffers omitted from workspace buffers

The mode was set before the window was displayed, which is where
persp-mode's check is.
This commit is contained in:
Henrik Lissner 2018-06-16 21:04:20 +02:00
parent ec6372ef66
commit 48c9936f8d
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -79,10 +79,10 @@
"Open eshell in the current buffer."
(interactive)
(let ((buf (+eshell--buffer (eq major-mode 'eshell-mode))))
(switch-to-buffer buf)
(+eshell--set-window (get-buffer-window buf) t)
(with-current-buffer buf
(unless (eq major-mode 'eshell-mode) (eshell-mode)))
(switch-to-buffer buf)
(+eshell--set-window (get-buffer-window buf) t)
(when command
(+eshell-run-command command))))