summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2019-06-12 08:08:34 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2019-06-12 08:08:34 +0000
commiteded975baed82042c08b88721877d88d30a78f11 (patch)
tree6a8ade73eee499a9bffe80d9406dad7b05d0d1a5 /usr.bin
parent87be9a1567e0caa10d71ef866b8e2d8fa625c584 (diff)
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')
-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);