mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Refactor +workspaces|associate-frame
No need to set current frame on first frame.
This commit is contained in:
@ -509,9 +509,9 @@ created."
|
|||||||
(defun +workspaces|associate-frame (frame &optional _new-frame-p)
|
(defun +workspaces|associate-frame (frame &optional _new-frame-p)
|
||||||
"Create a blank, new perspective and associate it with FRAME."
|
"Create a blank, new perspective and associate it with FRAME."
|
||||||
(when persp-mode
|
(when persp-mode
|
||||||
(with-selected-frame frame
|
(if (not (persp-frame-list-without-daemon))
|
||||||
(if (not (persp-frame-list-without-daemon))
|
(+workspace-switch +workspaces-main t)
|
||||||
(+workspace-switch +workspaces-main t)
|
(with-selected-frame frame
|
||||||
(+workspace-switch (format "#%s" (+workspace--generate-id)) t)
|
(+workspace-switch (format "#%s" (+workspace--generate-id)) t)
|
||||||
(unless (doom-real-buffer-p (current-buffer))
|
(unless (doom-real-buffer-p (current-buffer))
|
||||||
(switch-to-buffer (doom-fallback-buffer)))
|
(switch-to-buffer (doom-fallback-buffer)))
|
||||||
|
Reference in New Issue
Block a user