diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-11-21 14:30:15 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-11-21 14:30:15 +0000 |
commit | 08a0c5e661c6ca70b3a45a18d52223d8418c46ef (patch) | |
tree | 7fab04c4877a25f3304e0a595117b29c4fc4a2bd /screen.c | |
parent | c424ef37d05c7d1da87ba6518f6d15642f13301d (diff) | |
download | rtmux-08a0c5e661c6ca70b3a45a18d52223d8418c46ef.tar.gz rtmux-08a0c5e661c6ca70b3a45a18d52223d8418c46ef.tar.bz2 rtmux-08a0c5e661c6ca70b3a45a18d52223d8418c46ef.zip |
Use screen_* versions to avoid range checks (s->dy may be wrong), fix miscalculated free.
Diffstat (limited to 'screen.c')
-rw-r--r-- | screen.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1,4 +1,4 @@ -/* $Id: screen.c,v 1.28 2007-11-21 13:11:41 nicm Exp $ */ +/* $Id: screen.c,v 1.29 2007-11-21 14:30:15 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -160,8 +160,8 @@ screen_resize(struct screen *s, u_int sx, u_int sy) if (my > ny) my = ny; - screen_display_free_lines(s, 0, my); - screen_display_move_lines(s, 0, my, oy - my); + screen_free_lines(s, s->hsize, my); + screen_move_lines(s, s->hsize, my, oy - my); s->cy -= my; oy -= my; @@ -172,7 +172,7 @@ screen_resize(struct screen *s, u_int sx, u_int sy) /* * Remove any remaining lines from the bottom. */ - screen_display_free_lines(s, oy, ny); + screen_free_lines(s, s->hsize + oy - ny, ny); if (s->cy >= sy) s->cy = sy - 1; } @@ -187,7 +187,7 @@ screen_resize(struct screen *s, u_int sx, u_int sy) /* Size increasing. */ if (sy > oy) - screen_display_make_lines(s, oy, sy - oy); + screen_make_lines(s, s->hsize + oy, sy - oy); s->rupper = 0; s->rlower = s->dy - 1; |