Close window when hiding current shell

For eshell we do the same.
This commit is contained in:
Daniel Borchmann 2020-07-12 13:00:28 +02:00
parent 1252023886
commit ac815a06f1
Signed by: exot
GPG Key ID: 1C7071A75BB72D64

View File

@ -62,14 +62,13 @@ If already in `*ansi-term*' buffer, bury it."
(find-file user-init-file)) (find-file user-init-file))
(defun db/run-or-hide-shell () (defun db/run-or-hide-shell ()
"Opens an shell buffer if not already in one, and otherwise "Opens an shell buffer if not already in one, and closes it
returns to where we have been before." otherwise."
(interactive "") (interactive "")
(if (string= "shell-mode" major-mode) (if (not (eq 'shell-mode major-mode))
(progn (shell)
(bury-buffer) (bury-buffer)
(other-window -1)) (delete-window)))
(shell)))
;;; General Utilities ;;; General Utilities