summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/layout.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/tmux/layout.c')
-rw-r--r--usr.bin/tmux/layout.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/tmux/layout.c b/usr.bin/tmux/layout.c
index 2cf22b4e937..798ad29389f 100644
--- a/usr.bin/tmux/layout.c
+++ b/usr.bin/tmux/layout.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: layout.c,v 1.40 2019/04/17 14:37:48 nicm Exp $ */
+/* $OpenBSD: layout.c,v 1.41 2019/04/17 14:43:49 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -479,7 +479,7 @@ layout_resize(struct window *w, u_int sx, u_int sy)
* out proportionately - this should leave the layout fitting the new
* window size.
*/
- xchange = sx - w->sx;
+ xchange = sx - lc->sx;
xlimit = layout_resize_check(w, lc, LAYOUT_LEFTRIGHT);
if (xchange < 0 && xchange < -xlimit)
xchange = -xlimit;
@@ -493,7 +493,7 @@ layout_resize(struct window *w, u_int sx, u_int sy)
layout_resize_adjust(w, lc, LAYOUT_LEFTRIGHT, xchange);
/* Adjust vertically in a similar fashion. */
- ychange = sy - w->sy;
+ ychange = sy - lc->sy;
ylimit = layout_resize_check(w, lc, LAYOUT_TOPBOTTOM);
if (ychange < 0 && ychange < -ylimit)
ychange = -ylimit;