org-src: Add call to quit-restore-window in org-src-switch-to-buffer

* lisp/org-src.el (org-src-switch-to-buffer): Add call to
quit-restore-window in org-src-switch-to-buffer when
org-src-window-setup is other-window so that the popped up window is
closed on exit.
This commit is contained in:
Jack Kamm 2020-01-21 20:39:14 -08:00 committed by Kyle Meyer
parent 7d5e931f79
commit cd1014a75a
1 changed files with 3 additions and 1 deletions

View File

@ -809,7 +809,9 @@ Raise an error when current buffer is not a source editing buffer."
(pop-to-buffer buffer))
(`current-window (pop-to-buffer-same-window buffer))
(`other-window
(switch-to-buffer-other-window buffer))
(let ((cur-win (selected-window)))
(switch-to-buffer-other-window buffer)
(when (eq context 'exit) (quit-restore-window cur-win))))
(`split-window-below
(if (eq context 'exit)
(delete-window)