aboutsummaryrefslogtreecommitdiff
path: root/layout.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2017-03-11 16:01:12 +0000
committerThomas Adam <thomas@xteddy.org>2017-03-11 16:01:12 +0000
commit266e662fae06232b4154f1ac7194ea9e772dc38b (patch)
tree3d8286b4985656aa3bd84fc436c590f94cb7729d /layout.c
parent392253f0323a7453a978fc5599f03b2a7abd5c1b (diff)
parentd455da45eb8292185964041f1967a8b0b28c88af (diff)
downloadrtmux-266e662fae06232b4154f1ac7194ea9e772dc38b.tar.gz
rtmux-266e662fae06232b4154f1ac7194ea9e772dc38b.tar.bz2
rtmux-266e662fae06232b4154f1ac7194ea9e772dc38b.zip
Merge branch 'obsd-master'
Diffstat (limited to 'layout.c')
-rw-r--r--layout.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/layout.c b/layout.c
index 47d01851..5c2224bb 100644
--- a/layout.c
+++ b/layout.c
@@ -904,10 +904,11 @@ layout_split_pane(struct window_pane *wp, enum layout_type type, int size,
/* Create the new cell. */
lcnew = layout_create_cell(lc);
+ size = saved_size - 1 - new_size;
if (lc->type == LAYOUT_LEFTRIGHT)
- layout_set_size(lcnew, new_size, sy, 0, 0);
+ layout_set_size(lcnew, size, sy, 0, 0);
else if (lc->type == LAYOUT_TOPBOTTOM)
- layout_set_size(lcnew, sx, new_size, 0, 0);
+ layout_set_size(lcnew, sx, size, 0, 0);
if (insert_before)
TAILQ_INSERT_HEAD(&lc->cells, lcnew, entry);
else