diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2019-10-19 12:40:43 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2019-10-19 12:40:43 +0000 |
commit | b48a5b6efb6c4529dbac9c6b3a844896a3bc98ca (patch) | |
tree | 7ae0c915801c925a8b4917a111e8d296aa2eed8f /usr.bin | |
parent | 1e55b49f732429bb4416a82e35e62bcc862c21bd (diff) |
Do not crash trying to fix layout size if only one cell, from Azat Khuzhin.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/tmux/layout-custom.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tmux/layout-custom.c b/usr.bin/tmux/layout-custom.c index fa5b406d67d..3eea858dc41 100644 --- a/usr.bin/tmux/layout-custom.c +++ b/usr.bin/tmux/layout-custom.c @@ -1,4 +1,4 @@ -/* $OpenBSD: layout-custom.c,v 1.17 2019/10/14 09:16:48 nicm Exp $ */ +/* $OpenBSD: layout-custom.c,v 1.18 2019/10/19 12:40:42 nicm Exp $ */ /* * Copyright (c) 2010 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -210,7 +210,7 @@ layout_parse(struct window *w, const char *layout) } break; } - if (lc->sx != sx || lc->sy != sy) { + if (lc->type != LAYOUT_WINDOWPANE && (lc->sx != sx || lc->sy != sy)) { log_debug("fix layout %u,%u to %u,%u", lc->sx, lc->sy, sx,sy); layout_print_cell(lc, __func__, 0); lc->sx = sx - 1; lc->sy = sy - 1; |