diff --git a/ace-window.el b/ace-window.el index 03803d4..7efcd2f 100644 --- a/ace-window.el +++ b/ace-window.el @@ -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 ()