new-empty-buffer: force buffer to appear in new window
Pass non-nil force-same-window argument to switch-to-buffer, so the newly generated buffer is guaranteed to display in the newly created window.
This commit is contained in:
parent
b769756f6d
commit
4b92183cc0
|
@ -504,7 +504,9 @@ buffer in a split window."
|
|||
('below (spacemacs/split-window-vertically-and-switch))
|
||||
('above (split-window-vertically))
|
||||
('right (spacemacs/split-window-horizontally-and-switch)))
|
||||
(switch-to-buffer newbuf)))
|
||||
;; pass non-nil force-same-window to prevent `switch-to-buffer' from
|
||||
;; displaying buffer in another window
|
||||
(switch-to-buffer newbuf nil 'force-same-window)))
|
||||
|
||||
(defun spacemacs/new-empty-buffer-left ()
|
||||
"Create a new buffer called untitled(<n>),
|
||||
|
|
Loading…
Reference in a new issue