diff --git a/quickrun.el b/quickrun.el index 4bed111..cf8299d 100644 --- a/quickrun.el +++ b/quickrun.el @@ -756,7 +756,7 @@ if you set your own language configuration. (when eshell-buf (kill-buffer eshell-buf)) (eshell) - (kill-buffer quickrun--buffer-name) + (quickrun--kill-quickrun-buffer) (setq-local quickrun--shell-last-command cmd-str) (add-hook 'eshell-post-command-hook 'quickrun--eshell-post-hook) (quickrun--insert-command cmd-str) @@ -899,7 +899,7 @@ if you set your own language configuration. (defun quickrun--outputter-null () "Not documented." (delete-region (point-min) (point-max)) - (kill-buffer (get-buffer quickrun--buffer-name))) + (quickrun--kill-quickrun-buffer)) (defun quickrun--outputter-replace-region () "Not documented." @@ -1382,9 +1382,12 @@ by quickrun.el. But you can register your own command for some languages") (quickrun--add-remove-files dst))) (defun quickrun--kill-quickrun-buffer () - "Kill quickrun buffer." - (when (get-buffer quickrun--buffer-name) - (kill-buffer quickrun--buffer-name))) + (let (quickrun--buffer (get-buffer quickrun--buffer-name)) + (when quickrun--buffer + (let (quickrun--buffer-window (get-buffer-window quickrun--buffer-name)) + (when quickrun--buffer-window + (delete-window quickrun--buffer-window))) + (kill-buffer quickrun--buffer)))) (defun quickrun--setup-exec-buffer (buf) "Not documented."