From 4a89cccedbe0b32dd0fbab061ab5db73c3d9a1d7 Mon Sep 17 00:00:00 2001 From: Oleh Krehel Date: Thu, 23 Jul 2015 10:44:15 +0200 Subject: [PATCH] ace-window.el (aw-switch-to-window): Push early * 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 --- ace-window.el | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 ()