fix(eshell,shell): display buffer post-init
By displaying them pre-init: a) eshell will not have loaded, ensuring any user-popup rules in an (after! eshell ...) block don't load in time for the first eshell popup, b) Popup predicate functions don't have access to the full state of the buffer, if needed.
This commit is contained in:
parent
b15abdbd74
commit
46ba5826cd
2 changed files with 6 additions and 4 deletions
|
@ -73,11 +73,12 @@ If popup is focused, kill it."
|
|||
(set-process-query-on-exit-flag (get-buffer-process buffer) nil)
|
||||
(delete-window win)
|
||||
(ignore-errors (kill-buffer buffer)))
|
||||
(with-current-buffer (pop-to-buffer buffer)
|
||||
(with-current-buffer buffer
|
||||
(if (not (eq major-mode 'shell-mode))
|
||||
(shell buffer)
|
||||
(cd dir)
|
||||
(run-mode-hooks 'shell-mode-hook))))
|
||||
(run-mode-hooks 'shell-mode-hook)))
|
||||
(pop-to-buffer buffer))
|
||||
(when-let (process (get-buffer-process buffer))
|
||||
(set-process-sentinel process #'+shell--sentinel)
|
||||
(+shell--send-input buffer command))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue