fix(workspaces): use existing workspace on project switch

A "workspace already exists" error is thrown if trying to switch to
project workspace that already exists. This changes it to switch to the
workspace instead.

Fix: #8368
This commit is contained in:
Henrik Lissner
2025-05-06 00:26:27 -04:00
parent 555680036c
commit 722f5a2e18

View File

@ -583,7 +583,9 @@ This be hooked to `projectile-after-switch-project-hook'."
proot))))
(push (pop pre) post))
(unless pre ws))))
(ws (or ws (+workspace-new pname))))
(ws (or ws
(+workspace-get pname t)
(+workspace-new pname))))
(set-persp-parameter ws-param proot ws)
(+workspace-switch pname)
(with-current-buffer (doom-fallback-buffer)