summaryrefslogtreecommitdiffstats
path: root/screen.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2007-11-21 14:55:31 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2007-11-21 14:55:31 +0000
commitef18b7d6373aaa2d399980fdf7628563ce00ff9f (patch)
tree51949250da0ce855b85f1656de8420015cf4b588 /screen.c
parent2cdc75fa4efc82f0aa65f514ecec86eedd0404c7 (diff)
Move from the right place.
Diffstat (limited to 'screen.c')
-rw-r--r--screen.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/screen.c b/screen.c
index 7caebabb..a6014074 100644
--- a/screen.c
+++ b/screen.c
@@ -1,4 +1,4 @@
-/* $Id: screen.c,v 1.29 2007-11-21 14:30:15 nicm Exp $ */
+/* $Id: screen.c,v 1.30 2007-11-21 14:55:31 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -154,15 +154,16 @@ screen_resize(struct screen *s, u_int sx, u_int sy)
if (s->cy != 0) {
/*
* The cursor is not at the start. Try to remove as
- * many lines as possible from the top.
+ * many lines as possible from the top. (Up to the
+ * cursor line.)
*/
my = s->cy;
if (my > ny)
my = ny;
screen_free_lines(s, s->hsize, my);
- screen_move_lines(s, s->hsize, my, oy - my);
-
+ screen_move_lines(s, s->hsize, s->hsize + my, oy - my);
+
s->cy -= my;
oy -= my;
}