Revert to initial evil state on term popup toggle
i.e. switch to insert state and move cursor to prompt.
This commit is contained in:
parent
77a7b76108
commit
b2da28edfe
3 changed files with 15 additions and 4 deletions
|
@ -98,7 +98,10 @@ project (or if prefix ARG was present)."
|
|||
(let (confirm-kill-processes)
|
||||
(delete-window win)
|
||||
(ignore-errors (kill-buffer eshell-buffer)))
|
||||
(select-window win))
|
||||
(select-window win)
|
||||
(when (bound-and-true-p evil-local-mode)
|
||||
(evil-change-to-initial-state))
|
||||
(goto-char (point-max)))
|
||||
(with-current-buffer (pop-to-buffer eshell-buffer)
|
||||
(if (eq major-mode 'eshell-mode)
|
||||
(run-hooks 'eshell-mode-hook)
|
||||
|
@ -110,7 +113,7 @@ project (or if prefix ARG was present)."
|
|||
(setq default-directory target-project)
|
||||
(with-silent-modifications
|
||||
(goto-char (point-max))
|
||||
(when (re-search-backward eshell-prompt-regexp)
|
||||
(when (re-search-backward eshell-prompt-regexp nil t)
|
||||
(delete-region (match-end 0) (point-max)))
|
||||
(eshell-send-input))))
|
||||
(when command
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue