Skip to content

Commit 19c5324

Browse files
committed
Use split-window-vertically if split-window-below is not defined.
1 parent 250c622 commit 19c5324

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

json-mode.el

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,12 @@
7979
;; delete the window if we have one,
8080
;; so we can recreate it in the correct position
8181
(if temp-window
82-
(delete-window temp-window))
82+
(delete-window temp-window))
8383

8484
;; always put the temp window below the json window
85-
(set-window-buffer (split-window-below) temp-name))
85+
(set-window-buffer (if (fboundp 'split-window-below)
86+
(split-window-below)
87+
(split-window-vertically)) temp-name))
8688
))
8789

8890
(define-key json-mode-map (kbd "C-c C-p") 'json-mode-show-path)

0 commit comments

Comments
 (0)