Allow switch to normal buffers in exwm-workspace-switch-to-window

* exwm-workspace.el (exwm-workspace-switch-to-window): Allow switch to normal
  buffers.
This commit is contained in:
Chris Feng 2015-09-11 08:07:53 +08:00
parent 3f2f844569
commit 1d435157d3

View file

@ -219,10 +219,11 @@ The optional FORCE option is for internal use only."
(let ((buffer (read-buffer "Switch to window: " nil t))) (let ((buffer (read-buffer "Switch to window: " nil t)))
(when buffer (when buffer
(with-current-buffer buffer (with-current-buffer buffer
(when (and (eq major-mode 'exwm-mode) (if (and (eq major-mode 'exwm-mode)
(not (eq exwm--frame exwm-workspace--current))) (not (eq exwm--frame exwm-workspace--current)))
(exwm-workspace-move-window exwm-workspace-current-index (exwm-workspace-move-window exwm-workspace-current-index
exwm--id))))) exwm--id)
(switch-to-buffer buffer)))))
;; Hide buffers on other workspaces ;; Hide buffers on other workspaces
(dolist (pair exwm--id-buffer-alist) (dolist (pair exwm--id-buffer-alist)
(with-current-buffer (cdr pair) (with-current-buffer (cdr pair)