feature/workspaces: issue notice when switching to same buffer
This commit is contained in:
parent
7aa8d54e08
commit
343925e9ac
1 changed files with 5 additions and 2 deletions
|
@ -282,7 +282,8 @@ end of the workspace list."
|
|||
(string-match-p "^[0-9]+$" index))
|
||||
(setq index (string-to-number index)))
|
||||
(condition-case ex
|
||||
(let ((names (+workspace-list)))
|
||||
(let ((names (+workspace-list))
|
||||
(old-name (+workspace-current-name)))
|
||||
(cond ((numberp index)
|
||||
(let ((dest (nth index names)))
|
||||
(unless dest
|
||||
|
@ -293,7 +294,9 @@ end of the workspace list."
|
|||
(error "No workspace named %s" index))
|
||||
(persp-frame-switch index)))
|
||||
(unless (called-interactively-p 'interactive)
|
||||
(+workspace/display)))
|
||||
(if (equal (+workspace-current-name) old-name)
|
||||
(+workspace-message (format "Already in %s" old-name) 'warn)
|
||||
(+workspace/display))))
|
||||
('error (+workspace-error (cadr ex) t))))
|
||||
|
||||
;;;###autoload
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue