mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
+workspace/delete: error if workspace doesn't exist
This commit is contained in:
@ -301,6 +301,8 @@ workspace to delete."
|
||||
current-name))))
|
||||
(condition-case-unless-debug ex
|
||||
(let ((workspaces (+workspace-list-names)))
|
||||
(if (not (member name workspaces))
|
||||
(+workspace-message (format "'%s' workspace doesn't exist" name) 'warn)
|
||||
(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)
|
||||
@ -316,7 +318,7 @@ workspace to delete."
|
||||
(unless (string= (car workspaces) +workspaces-main)
|
||||
(+workspace-delete name))
|
||||
(doom/kill-all-buffers)))
|
||||
(+workspace-message (format "Deleted '%s' workspace" name) 'success))
|
||||
(+workspace-message (format "Deleted '%s' workspace" name) 'success)))
|
||||
('error (+workspace-error ex t))))
|
||||
|
||||
;;;###autoload
|
||||
|
Reference in New Issue
Block a user