Teach X.A.DynamicProjects to use removeWorkspaceByTag when deleting a project

When deleting a dynamic project, also delete its workspace.
This commit is contained in:
Peter Jones
2016-11-15 17:00:50 -07:00
parent d21ed81801
commit 5790913eae
2 changed files with 10 additions and 1 deletions

View File

@@ -210,7 +210,8 @@ switchProject p = do
-- If the project we are switching away from has no windows, and
-- it's a dynamic project, remove it from the configuration.
when (null ws && isNothing (projectStartHook oldp)) $
when (null ws && isNothing (projectStartHook oldp)) $ do
removeWorkspaceByTag name -- also remove the old workspace
XS.modify (\s -> s {projects = Map.delete name $ projects s})
appendWorkspace (projectName p)