Skip to content

Commit

Permalink
ace-window.el (aw-switch-to-window): Push early
Browse files Browse the repository at this point in the history
* ace-window.el (aw-switch-to-window): Push current window to ring
  before switching frames. It's OK to push without checking, the check
  is performed in `aw--push-window'.

Fixes #61
  • Loading branch information
abo-abo committed Jul 23, 2015
1 parent f786679 commit 4a89ccc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions ace-window.el
Expand Up @@ -423,13 +423,12 @@ Windows are numbered top down, left to right."
(defun aw-switch-to-window (window)
"Switch to the window WINDOW."
(let ((frame (window-frame window)))
(aw--push-window (selected-window))
(when (and (frame-live-p frame)
(not (eq frame (selected-frame))))
(select-frame-set-input-focus frame))
(if (window-live-p window)
(progn
(aw--push-window (selected-window))
(select-window window))
(select-window window)
(error "Got a dead window %S" window))))

(defun aw-flip-window ()
Expand Down

0 comments on commit 4a89ccc

Please sign in to comment.