diff options
author | Pierre Courtieu <courtieu@lri.fr> | 2010-08-25 09:51:16 +0000 |
---|---|---|
committer | Pierre Courtieu <courtieu@lri.fr> | 2010-08-25 09:51:16 +0000 |
commit | f294af004f1dbcdf3a42efe3caade7fd6a53ef9e (patch) | |
tree | a56d0bb83c41d2f7b5b8ea597c15b359b39259e1 /generic/pg-response.el | |
parent | d8dcc5a9a4e4c8bf55b697f8a9a1f85fe1240356 (diff) |
Fixed the bug of vertical window splitting when the size of the window
is too small. However if the frame is too small the bug remains (but
it is much less probable).
Diffstat (limited to 'generic/pg-response.el')
-rw-r--r-- | generic/pg-response.el | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/generic/pg-response.el b/generic/pg-response.el index 1e022fdb..08ad827b 100644 --- a/generic/pg-response.el +++ b/generic/pg-response.el @@ -110,16 +110,21 @@ Internal variable, setting this will have no effect!") (defun proof-three-window-enable () (proof-layout-windows)) +(defun proof-safe-split-window-vertically () + (if (<= (window-height) (* 2 window-min-height)) + (enlarge-window (+ 3 (* 2 window-min-height)))) + (split-window-vertically)) + (defun proof-select-three-b (b1 b2 b3 &optional nohorizontalsplit) "Select three buffers. Put them into three windows, selecting the last one." (interactive "bBuffer1:\nbBuffer2:\nbBuffer3:") (delete-other-windows) (if nohorizontalsplit - (split-window-vertically) + (proof-safe-split-window-vertically) (split-window-horizontally)) (switch-to-buffer b1) (other-window 1) - (split-window-vertically) + (proof-safe-split-window-vertically) (switch-to-buffer b2) (other-window 1) (switch-to-buffer b3) |