aboutsummaryrefslogtreecommitdiff
path: root/screen.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2013-05-25 11:48:12 +0100
committerThomas Adam <thomas@xteddy.org>2013-05-25 11:48:12 +0100
commit76cb088d16fd5aa47b54428368ef403cbbcf4f5a (patch)
tree3dd07bcc1e7aa513dbd7ecd38c3569e7b7a4e890 /screen.c
parent907ad00300506c25ee84223811e25a411dc21517 (diff)
parent88a4da97478ec6b4b2f361315a5a183333d0aa3f (diff)
downloadrtmux-76cb088d16fd5aa47b54428368ef403cbbcf4f5a.tar.gz
rtmux-76cb088d16fd5aa47b54428368ef403cbbcf4f5a.tar.bz2
rtmux-76cb088d16fd5aa47b54428368ef403cbbcf4f5a.zip
Merge branch 'obsd-master'
Conflicts: tmux.h
Diffstat (limited to 'screen.c')
-rw-r--r--screen.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/screen.c b/screen.c
index e92c6aa7..39720f4e 100644
--- a/screen.c
+++ b/screen.c
@@ -366,7 +366,13 @@ void
screen_reflow(struct screen *s, u_int new_x)
{
struct grid *old = s->grid;
+ u_int change;
s->grid = grid_create(old->sx, old->sy, old->hlimit);
- s->cy -= grid_reflow(s->grid, old, new_x);
+
+ change = grid_reflow(s->grid, old, new_x);
+ if (change < s->cy)
+ s->cy -= change;
+ else
+ s->cy = 0;
}