refactor!(:term): toggle commands now always hide
BREAKING CHANGE: previously, <leader> o t commands would only hide the terminal popup if it was focused. If not, they would move the focus to the terminal window. This is unintuitive to the "toggle" description, and arguably less useful, since refocusing to the terminal can be easily done with regular window refocus commands. Therefore, <leader> o t now just hides the terminal popup. Fix #3374
This commit is contained in:
parent
7274f73500
commit
7933e54542
4 changed files with 9 additions and 29 deletions
|
@ -69,15 +69,10 @@ If popup is focused, kill it."
|
|||
"main"))))
|
||||
(dir default-directory))
|
||||
(if-let (win (get-buffer-window buffer))
|
||||
(if (eq (selected-window) win)
|
||||
(let (confirm-kill-processes)
|
||||
(set-process-query-on-exit-flag (get-buffer-process buffer) nil)
|
||||
(delete-window win)
|
||||
(ignore-errors (kill-buffer buffer)))
|
||||
(select-window win)
|
||||
(when (bound-and-true-p evil-local-mode)
|
||||
(evil-change-to-initial-state))
|
||||
(goto-char (point-max)))
|
||||
(let (confirm-kill-processes)
|
||||
(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)
|
||||
(if (not (eq major-mode 'shell-mode))
|
||||
(shell buffer)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue