summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--init.el11
1 files changed, 7 insertions, 4 deletions
diff --git a/init.el b/init.el
index 393ad27..215fed5 100644
--- a/init.el
+++ b/init.el
@@ -1347,14 +1347,17 @@
(defun jao-trisect (&optional force)
(interactive)
(let ((fw (frame-width)))
- (delete-other-windows)
(cond ((or force (>= fw 240))
- (let ((w (- (/ fw 3))))
+ (let ((b (current-buffer)))
(delete-other-windows)
- (split-window-horizontally w)
- (split-window-horizontally w)
+ (switch-to-buffer (other-buffer b))
+ (split-window-horizontally)
+ (switch-to-buffer (other-buffer b))
+ (split-window-horizontally)
+ (switch-to-buffer b)
(balance-windows)))
((> fw 162)
+ (delete-other-windows)
(split-window-horizontally)
(switch-to-buffer (other-buffer))))))