summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/layout-custom.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2019-06-12 08:08:33 +0000
committernicm <nicm@openbsd.org>2019-06-12 08:08:33 +0000
commit8e1abdf8a8ed897046e3a8488250ad3c39dd6ab3 (patch)
tree255a9d6b13966fb32adeb7b021ce88ac93bf0100 /usr.bin/tmux/layout-custom.c
parentA note about log.c. (diff)
downloadwireguard-openbsd-8e1abdf8a8ed897046e3a8488250ad3c39dd6ab3.tar.xz
wireguard-openbsd-8e1abdf8a8ed897046e3a8488250ad3c39dd6ab3.zip
Do not always resize the window back to its original size after applying
a layout, let the normal window resize process do it. This means windows are not resized at all if window-size is manual, and are not resized multiple times if later attached to a different size terminal.
Diffstat (limited to 'usr.bin/tmux/layout-custom.c')
-rw-r--r--usr.bin/tmux/layout-custom.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/usr.bin/tmux/layout-custom.c b/usr.bin/tmux/layout-custom.c
index 6ccfeb78390..db4ec953478 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.12 2018/10/18 08:38:01 nicm Exp $ */
+/* $OpenBSD: layout-custom.c,v 1.13 2019/06/12 08:08:33 nicm Exp $ */
/*
* Copyright (c) 2010 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -168,10 +168,7 @@ layout_parse(struct window *w, const char *layout)
/* Update pane offsets and sizes. */
layout_fix_offsets(lc);
layout_fix_panes(w);
-
- /* Then resize the layout back to the original window size. */
- layout_resize(w, sx, sy);
- window_resize(w, sx, sy);
+ recalculate_sizes();
layout_print_cell(lc, __func__, 0);