瀏覽代碼

org-src: Fix `org-edit-src-exit' with `split-window-below'

* lisp/org-src.el: (org-src-switch-to-buffer): Delete window when
exiting source buffer instead of splitting it again.
Daniel Kraus 6 年之前
父節點
當前提交
465255f82f
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      lisp/org-src.el

+ 3 - 1
lisp/org-src.el

@@ -789,7 +789,9 @@ Raise an error when current buffer is not a source editing buffer."
     (`other-window
      (switch-to-buffer-other-window buffer))
     (`split-window-below
-     (select-window (split-window-vertically))
+     (if (eq context 'exit)
+	 (delete-window)
+       (select-window (split-window-vertically)))
      (pop-to-buffer-same-window buffer))
     (`other-frame
      (pcase context