aboutsummaryrefslogtreecommitdiff
path: root/screen.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2013-05-31 13:00:11 +0100
committerNicholas Marriott <nicholas.marriott@gmail.com>2013-05-31 13:00:11 +0100
commit2ee9c4df12429d4f6fb8f06a373fdd5c0347049c (patch)
tree1c241b4bcd2e637cbae11d7fb6b34840d9839ec7 /screen.c
parente6c77e7afbcee07ed6237f2a0f30e70f45ecf0ba (diff)
parent76cb088d16fd5aa47b54428368ef403cbbcf4f5a (diff)
downloadrtmux-2ee9c4df12429d4f6fb8f06a373fdd5c0347049c.tar.gz
rtmux-2ee9c4df12429d4f6fb8f06a373fdd5c0347049c.tar.bz2
rtmux-2ee9c4df12429d4f6fb8f06a373fdd5c0347049c.zip
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
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;
}