summaryrefslogtreecommitdiffstats
path: root/window.c
diff options
context:
space:
mode:
authornicm <nicm>2017-05-31 10:15:51 +0000
committernicm <nicm>2017-05-31 10:15:51 +0000
commit80c6b487dc05662efd675695b7db93563e582f7c (patch)
tree0565b5090e2fc22242975626ed4f50111a53b605 /window.c
parent7eb496c00c313c2f8ab8debe6d154d5ac0db277b (diff)
Because we defer actually resizing applications (calling TIOCSWINSZ)
until the end of the server loop, tmux may have gone through several internal resizes in between. This can be a problem if the final size is the same as the initial size (what the application things it currently is), because the application may choose not to redraw, assuming the screen state is unchanged, when in fact tmux has thrown away parts of the screen, assuming the application will redraw them. To avoid this, do an extra resize if the new size is the same size as the initial size. This should force the application to redraw when tmux needs it to, while retaining the benefits of deferring (so we now resize at most two times instead of at most one - and only two very rarely). Fixes a problem with break-pane and zoomed panes reported by Michal Mazurek.
Diffstat (limited to 'window.c')
-rw-r--r--window.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/window.c b/window.c
index 0ca0c72c..5fe7c8b8 100644
--- a/window.c
+++ b/window.c
@@ -800,8 +800,8 @@ window_pane_create(struct window *w, u_int sx, u_int sy, u_int hlimit)
wp->xoff = 0;
wp->yoff = 0;
- wp->sx = sx;
- wp->sy = sy;
+ wp->sx = wp->osx = sx;
+ wp->sy = wp->osx = sy;
wp->pipe_fd = -1;
wp->pipe_off = 0;