Fix `layout-switch-by-pos`

Now it resets the window layout if there isn't already a perspective
loaded for that position.

Fixes #3774
This commit is contained in:
Adam Olsen 2015-11-13 08:11:42 -07:00 committed by syl20bnr
parent 0da1bda904
commit bc82ec0bec
1 changed files with 2 additions and 1 deletions

View File

@ -145,7 +145,8 @@
(when (y-or-n-p
(concat "Perspective in this position doesn't exist.\n"
"Do you want to create one? "))
(persp-switch nil)))))
(let ((persp-reset-windows-on-nil-window-conf t))
(persp-switch nil))))))
;; Define all `spacemacs/persp-switch-to-X' functions
(dolist (i (number-sequence 9 0 -1))