feature/ivy: fix virtual buffers in +ivy/switch-workspace-buffer #331

The former +ivy/switch-workspace-buffer constructed its own collection
of buffers, so ivy-use-virtual-buffers would have no effect on it.  Use
internal-complete-buffer instead and ivy-read will know what to do under
the hood.
This commit is contained in:
Henrik Lissner 2018-01-08 14:43:56 -05:00
parent 1c2683ce9d
commit f2e5321ce1
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -45,7 +45,8 @@
If ARG (universal argument), open selection in other-window."
(interactive "P")
(ivy-read "Switch to workspace buffer: "
(mapcar #'buffer-name (delq (current-buffer) (doom-buffer-list)))
'internal-complete-buffer
:predicate #'+ivy--is-workspace-or-other-buffer-p
:action (if arg
#'ivy--switch-buffer-other-window-action
#'ivy--switch-buffer-action)