mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Fix read-only errors when reopening eshell buffers
Caused because eshell would try to insert the banner into the eshell prompt.
This commit is contained in:
@ -85,7 +85,9 @@
|
||||
(let* ((default-directory (if arg default-directory (doom-project-root)))
|
||||
(buf (+eshell--unused-buffer)))
|
||||
(with-current-buffer (switch-to-buffer buf)
|
||||
(eshell-mode)
|
||||
(if (eq major-mode 'eshell-mode)
|
||||
(run-hooks 'eshell-mode-hook)
|
||||
(eshell-mode))
|
||||
(if command (+eshell-run-command command buf)))
|
||||
buf))
|
||||
|
||||
@ -96,7 +98,9 @@
|
||||
(let* ((default-directory (if arg default-directory (doom-project-root)))
|
||||
(buf (+eshell--unused-buffer)))
|
||||
(with-current-buffer (pop-to-buffer buf)
|
||||
(eshell-mode)
|
||||
(if (eq major-mode 'eshell-mode)
|
||||
(run-hooks 'eshell-mode-hook)
|
||||
(eshell-mode))
|
||||
(if command (+eshell-run-command command buf)))
|
||||
buf))
|
||||
|
||||
|
Reference in New Issue
Block a user