Don't delete workspace if visible in another frame

This leaves persp-mode in a semi-broken state.
This commit is contained in:
Henrik Lissner
2018-06-23 19:28:34 +02:00
parent f6dc6ac74e
commit fbf7834d93

View File

@ -291,7 +291,9 @@ workspace to delete."
current-name))))
(condition-case-unless-debug ex
(let ((workspaces (+workspace-list-names)))
(cond ((> (length workspaces) 1)
(cond ((delq (selected-frame) (persp-frames-with-persp (get-frame-persp)))
(user-error "Can't close workspace, it's visible in another frame"))
((> (length workspaces) 1)
(+workspace-delete name)
(+workspace-switch
(if (+workspace-exists-p +workspace--last)