emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/buffer-expose 07ac8cf 12/38: Create window list without


From: Clemens Radermacher
Subject: [elpa] externals/buffer-expose 07ac8cf 12/38: Create window list without redisplay
Date: Mon, 25 Feb 2019 13:37:58 -0500 (EST)

branch: externals/buffer-expose
commit 07ac8cfad6ee2610ef44ef1984b12a0491ea5c85
Author: Clemens Radermacher <address@hidden>
Commit: Clemens Radermacher <address@hidden>

    Create window list without redisplay
---
 buffer-expose.el | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/buffer-expose.el b/buffer-expose.el
index c2365cc..43e3dcf 100644
--- a/buffer-expose.el
+++ b/buffer-expose.el
@@ -375,18 +375,20 @@ Windows are orderd by `buffer-expose--next-window'."
   "Create window grid with X columns, Y rows."
   (let ((window-min-width 0)
         (window-min-height 0)
-        (window-combination-resize t))
+        (window-combination-resize t)
+        (ws (list (selected-window))))
     (delete-other-windows)
     (dotimes (_ (1- x))
-      (split-window-horizontally)
+      (push (split-window-horizontally) ws)
       (dotimes (_ (1- y))
-        (split-window-vertically))
+        (push (split-window-vertically) ws))
       (other-window y))
     (dotimes (_ (1- y))
-      (split-window-vertically))
+      (push (split-window-vertically) ws))
     (balance-windows)
+    ;; TODO: order left to right
     (setq buffer-expose--window-list
-          (buffer-expose--window-list))))
+          (nreverse ws))))
 
 (defun buffer-expose--create-empty-buffer (&optional name)
   "Create buffer for empty window with name NAME.
@@ -805,13 +807,10 @@ F defaults to the first window of the overview."
 
 F defaults to the currently selected window."
   (let ((f (or f (selected-window)))
-        (w nil)
-        (nw nil))
+        (w nil))
     (or (window-in-direction 'right f)
         (when (setq w (window-in-direction 'below f))
-          (while (setq w (window-in-direction 'left w))
-            (setq nw w))
-          nw))))
+          (buffer-expose--first-window-in-row w)))))
 
 (defun buffer-expose--prev-window (&optional f)
   "Get previous window for window F.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]