]> code.delx.au - gnu-emacs-elpa/commitdiff
ace-window.el (aw-swap-invert): New defcustom
authorOleh Krehel <ohwoeowho@gmail.com>
Wed, 20 May 2015 17:14:58 +0000 (19:14 +0200)
committerOleh Krehel <ohwoeowho@gmail.com>
Wed, 20 May 2015 17:14:58 +0000 (19:14 +0200)
* ace-window.el (aw-swap-window): Update.

Fixes #52

ace-window.el

index 30c0f6a953ea87682372b2531009a36dae0fc4b5..a1c12ed2e8729bae06d20139b6aec25ebbcc8b84 100644 (file)
@@ -447,6 +447,10 @@ Windows are numbered top down, left to right."
           (delete-window window)
         (error "Got a dead window %S" window)))))
 
+(defcustom aw-swap-invert nil
+  "When non-nil, the other of the two swapped windows gets the point."
+  :type 'boolean)
+
 (defun aw-swap-window (window)
   "Swap buffers of current window and WINDOW."
   (cl-labels ((swap-windows (window1 window2)
@@ -464,7 +468,9 @@ Windows are numbered top down, left to right."
       (when (and (window-live-p window)
                  (not (eq window this-window)))
         (aw--push-window this-window)
-        (swap-windows this-window window)))))
+        (if aw-swap-invert
+            (swap-windows window this-window)
+          (swap-windows this-window window))))))
 
 (defun aw-split-window-vert (window)
   "Split WINDOW vertically."