summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kraus <daniel@kraus.my>2019-01-22 17:03:04 +0000
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2019-01-23 15:32:04 +0100
commit465255f82fd1d85c9c74a73a31fb3c18fa98d53a (patch)
tree8f0021d0585c48a6f0905664fd1b19795ae4c398
parent3fc7b0639d6d7ce854d0df26ce98141fba6b987a (diff)
downloadorg-mode-465255f82fd1d85c9c74a73a31fb3c18fa98d53a.tar.gz
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.
-rw-r--r--lisp/org-src.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/org-src.el b/lisp/org-src.el
index c27a991..d261a23 100644
--- a/lisp/org-src.el
+++ b/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