Skip to content

Commit

Permalink
persp-get-buffer-names respects deferred perspectives
Browse files Browse the repository at this point in the history
  • Loading branch information
Thibaut Meyer committed Oct 8, 2022
1 parent 325374b commit 0621a1d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions perspective.el
Original file line number Diff line number Diff line change
Expand Up @@ -1245,11 +1245,16 @@ See also `persp-get-buffers' to get all buffers."
(let ((name (if (stringp persp-or-name)
persp-or-name
(persp-name (or persp-or-name (persp-curr)))))
(persp (if (perspective-p persp-or-name)
persp-or-name
(persp-new persp-or-name)))
buffers)
(with-selected-frame (or frame (selected-frame))
(when (member name (persp-names))
(with-perspective name
(setq buffers (persp-current-buffer-names)))))
(if (persp-deferred persp)
(setq buffers (mapcar 'buffer-name (persp-buffers persp)))
(with-perspective name
(setq buffers (persp-current-buffer-names))))))
buffers))

(defun persp-read-buffer (prompt &optional def require-match predicate)
Expand Down

0 comments on commit 0621a1d

Please sign in to comment.