Fix windows surviving creation of new workspaces

Particularly windows that resist `delete-window`, like treemacs, when a
new workspace is switched to.

Relevant to #1348
This commit is contained in:
Henrik Lissner 2019-04-21 00:03:44 -04:00
parent a8c46e3136
commit 4e0802ee01
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -137,7 +137,9 @@ Otherwise return t on success, nil otherwise."
(let ((persp (persp-add-new name)) (let ((persp (persp-add-new name))
(+popup--inhibit-transient t)) (+popup--inhibit-transient t))
(save-window-excursion (save-window-excursion
(delete-other-windows) (let ((ignore-window-parameters t)
(+popup--inhibit-transient t))
(delete-other-windows))
(switch-to-buffer (doom-fallback-buffer)) (switch-to-buffer (doom-fallback-buffer))
(setf (persp-window-conf persp) (setf (persp-window-conf persp)
(funcall persp-window-state-get-function (selected-frame)))) (funcall persp-window-state-get-function (selected-frame))))