ui/popup: respect org-src-window-setup
This commit is contained in:
parent
685f282b53
commit
b349dd3473
1 changed files with 3 additions and 4 deletions
|
@ -232,10 +232,9 @@ the command buffer."
|
||||||
(defun +popup*org-src-pop-to-buffer (orig-fn buffer context)
|
(defun +popup*org-src-pop-to-buffer (orig-fn buffer context)
|
||||||
"Hand off the src-block window to the popup system by using `display-buffer'
|
"Hand off the src-block window to the popup system by using `display-buffer'
|
||||||
instead of switch-to-buffer-*."
|
instead of switch-to-buffer-*."
|
||||||
(if +popup-mode
|
(if (and (eq org-src-window-setup 'other-window)
|
||||||
(if (eq org-src-window-setup 'switch-invisibly) ; for internal calls
|
+popup-mode)
|
||||||
(set-buffer buffer)
|
(pop-to-buffer buffer)
|
||||||
(display-buffer buffer))
|
|
||||||
(funcall orig-fn buffer context)))
|
(funcall orig-fn buffer context)))
|
||||||
(advice-add #'org-src-switch-to-buffer :around #'+popup*org-src-pop-to-buffer)
|
(advice-add #'org-src-switch-to-buffer :around #'+popup*org-src-pop-to-buffer)
|
||||||
(setq org-src-window-setup 'other-window)
|
(setq org-src-window-setup 'other-window)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue