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
|
@ -26,12 +26,7 @@ Returns the vterm buffer."
|
|||
(when (window-live-p window)
|
||||
(delete-window window))))
|
||||
(if-let (win (get-buffer-window buffer-name))
|
||||
(if (eq (selected-window) win)
|
||||
(delete-window win)
|
||||
(select-window win)
|
||||
(when (bound-and-true-p evil-local-mode)
|
||||
(evil-change-to-initial-state))
|
||||
(goto-char (point-max)))
|
||||
(delete-window win)
|
||||
(let ((buffer (get-buffer-create buffer-name)))
|
||||
(with-current-buffer buffer
|
||||
(unless (eq major-mode 'vterm-mode)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue