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
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -291,7 +291,9 @@ workspace to delete."
current-name)))) current-name))))
(condition-case-unless-debug ex (condition-case-unless-debug ex
(let ((workspaces (+workspace-list-names))) (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-delete name)
(+workspace-switch (+workspace-switch
(if (+workspace-exists-p +workspace--last) (if (+workspace-exists-p +workspace--last)