Refactor +workspaces|associate-frame

No need to set current frame on first frame.
This commit is contained in:
Henrik Lissner 2018-06-30 02:21:57 +02:00
parent 2dbdbc245c
commit 91c4448ed2
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -509,9 +509,9 @@ created."
(defun +workspaces|associate-frame (frame &optional _new-frame-p)
"Create a blank, new perspective and associate it with FRAME."
(when persp-mode
(with-selected-frame frame
(if (not (persp-frame-list-without-daemon))
(+workspace-switch +workspaces-main t)
(if (not (persp-frame-list-without-daemon))
(+workspace-switch +workspaces-main t)
(with-selected-frame frame
(+workspace-switch (format "#%s" (+workspace--generate-id)) t)
(unless (doom-real-buffer-p (current-buffer))
(switch-to-buffer (doom-fallback-buffer)))