mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
ui/popup: respect org-src-window-setup
This commit is contained in:
@ -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)
|
||||||
|
Reference in New Issue
Block a user