From 0dafb7349ae7fb31215fde6016b6d63008ba5b2c Mon Sep 17 00:00:00 2001
From: Timo Sirainen <cras@irssi.org>
Date: Thu, 15 Nov 2001 00:32:30 +0000
Subject: Scrolling should dirty the whole scrolling area, not just the new
 lines.

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2014 dbcabf3a-b0e7-0310-adc4-f8d773084564
---
 src/fe-text/term-terminfo.c | 20 +++++---------------
 1 file changed, 5 insertions(+), 15 deletions(-)

(limited to 'src')

diff --git a/src/fe-text/term-terminfo.c b/src/fe-text/term-terminfo.c
index 7427985b..e110085f 100644
--- a/src/fe-text/term-terminfo.c
+++ b/src/fe-text/term-terminfo.c
@@ -233,24 +233,14 @@ void term_window_clear(TERM_WINDOW *window)
 /* Scroll window up/down */
 void term_window_scroll(TERM_WINDOW *window, int count)
 {
-	int y, idx;
+	int y;
 
 	terminfo_scroll(window->y, window->y+window->height-1, count);
-
-        /* set the newly scrolled lines dirty */
-	if (count < 0) {
-		/* scrolling down - dirty the top */
-		idx = window->y;
-                count = -count;
-	} else {
-		/* scrolling up - dirty the bottom */
-		idx = window->y+window->height-count;
-	}
-
-	for (y = 0; y < count; y++)
-		term_lines_empty[idx+y] = FALSE;
-
         term_move_reset(vcx, vcy);
+
+        /* set the newly scrolled area dirty */
+	for (y = 0; y < window->height; y++)
+		term_lines_empty[window->y+y] = FALSE;
 }
 
 /* Change active color */
-- 
cgit v1.2.3