diff options
author | 2017-03-11 15:16:35 +0000 | |
---|---|---|
committer | 2017-03-11 15:16:35 +0000 | |
commit | f9ebce2c35744becd7cc04ca951b9705360574a7 (patch) | |
tree | c44b0871877fc23133428df47b20258a5affa913 /usr.bin/tmux/layout.c | |
parent | Only look for window and pane parts of target as a sesson and window if (diff) | |
download | wireguard-openbsd-f9ebce2c35744becd7cc04ca951b9705360574a7.tar.xz wireguard-openbsd-f9ebce2c35744becd7cc04ca951b9705360574a7.zip |
Fix calculation of size for full size splits.
Diffstat (limited to 'usr.bin/tmux/layout.c')
-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 |