diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2017-03-11 15:16:36 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2017-03-11 15:16:36 +0000 |
commit | d049ad5cb3699efdd1a5ab497f187fe791d09ae8 (patch) | |
tree | 1da15703adc71e9bc732bdf7580f9a70e296068a /usr.bin | |
parent | 57b79db0d6377248332eae81ba4d64b4d8ccb309 (diff) |
Fix calculation of size for full size splits.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/tmux/layout.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/tmux/layout.c b/usr.bin/tmux/layout.c index 1dc08541f5d..f5e4c4c6cf9 100644 --- a/usr.bin/tmux/layout.c +++ b/usr.bin/tmux/layout.c @@ -1,4 +1,4 @@ -/* $OpenBSD: layout.c,v 1.31 2016/10/16 22:06:40 nicm Exp $ */ +/* $OpenBSD: layout.c,v 1.32 2017/03/11 15:16:35 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -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 |