feature/workspaces: fix buffer-bleedover from other workspaces

The frame buffer-predicate wasn't discriminating against buffers that
were in other perspectives, allowing you to `next-buffer` into them.
UNACCEPTABLE.
This commit is contained in:
Henrik Lissner 2018-02-02 19:47:28 -05:00
parent 2d641bb059
commit d9a80a9520
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 9 additions and 9 deletions

View file

@ -48,12 +48,6 @@
"Return non-nil if buffer is in workspace (defaults to current workspace)."
(persp-contain-buffer-p buffer (or workspace (+workspace-current)) nil))
;;;###autoload
(defun +workspace-alien-buffer-p (buffer)
"Return non-nil if BUFFER isn't a member of the current workspace."
(and (get-buffer-window buffer)
(not (+workspace-contains-buffer-p buffer))))
;; --- Getters ----------------------------
@ -274,6 +268,8 @@ workspace to delete."
(if (+workspace-exists-p +workspace--last)
+workspace--last
(car (+workspace-list-names))))
(unless (doom-buffer-frame-predicate (current-buffer))
(switch-to-buffer (doom-fallback-buffer)))
(format "Deleted '%s' workspace" name))
((= workspaces 1)
(format "Can't delete the last workspace!"))