Skip to content

Commit db5763f

Browse files
committed
ace-window.el (aw-swap-window): improve
Can now swap when there are two frames with one window each.
1 parent 038a426 commit db5763f

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

ace-window.el

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
;; Author: Oleh Krehel <[email protected]>
66
;; URL: https://github.com/abo-abo/ace-window
7-
;; Version: 0.5.0
7+
;; Version: 0.6.0
88
;; Package-Requires: ((ace-jump-mode "2.0"))
99
;; Keywords: cursor, window, location
1010

@@ -322,15 +322,14 @@ Windows are numbered top down, left to right."
322322
(set-window-buffer window2 buffer1)
323323
(select-window window2))))
324324
(let ((frame (aj-position-frame aj-data))
325-
(window (aj-position-window aj-data)))
325+
(window (aj-position-window aj-data))
326+
(this-window (selected-window)))
326327
(when (and (frame-live-p frame)
327328
(not (eq frame (selected-frame))))
328329
(select-frame-set-input-focus (window-frame window)))
329330
(when (and (window-live-p window)
330-
(not (eq window (selected-window))))
331-
(swap-windows
332-
(get-buffer-window (current-buffer))
333-
window)))))
331+
(not (eq window this-window)))
332+
(swap-windows this-window window)))))
334333

335334
(defun aw-offset (window)
336335
"Return point in WINDOW that's closest to top left corner.

0 commit comments

Comments
 (0)