[dev] [st PATCH] Use tfulldirt instead of setting all lines dirty in tresize.

From: noname <noname_AT_inventati.org>
Date: Mon, 28 Apr 2014 02:16:21 +0400

---
 st.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/st.c b/st.c
index 25da193..57cc4c4 100644
--- a/st.c
+++ b/st.c
_AT_@ -2621,14 +2621,12 @@ tresize(int col, int row) {
 
 	/* resize each row to new width, zero-pad if needed */
 	for(i = 0; i < minrow; i++) {
-		term.dirty[i] = 1;
 		term.line[i] = xrealloc(term.line[i], col * sizeof(Glyph));
 		term.alt[i]  = xrealloc(term.alt[i],  col * sizeof(Glyph));
 	}
 
 	/* allocate any new rows */
 	for(/* i == minrow */; i < row; i++) {
-		term.dirty[i] = 1;
 		term.line[i] = xmalloc(col * sizeof(Glyph));
 		term.alt[i] = xmalloc(col * sizeof(Glyph));
 	}
_AT_@ -2644,6 +2642,7 @@ tresize(int col, int row) {
 	/* update terminal size */
 	term.col = col;
 	term.row = row;
+	tfulldirt();
 	/* reset scrolling region */
 	tsetscroll(0, row-1);
 	/* make use of the LIMIT in tmoveto */
-- 
1.8.4
Received on Mon Apr 28 2014 - 00:16:21 CEST

This archive was generated by hypermail 2.3.0 : Mon Apr 28 2014 - 00:24:06 CEST