--- rxvt-unicode/src/screen.C 2006/02/18 15:24:39 1.260 +++ rxvt-unicode/src/screen.C 2006/02/18 15:44:26 1.261 @@ -2108,6 +2108,7 @@ && abs (num_scr) < nrow && !have_bg) { int16_t nits; + int i = num_scr; int j; int len, wlen; dLocal (int, num_scr); @@ -2115,6 +2116,7 @@ j = nrow; wlen = len = -1; row = i > 0 ? 0 : j - 1; + for (; j-- >= 0; row += (i > 0 ? 1 : -1)) { if (row + i >= 0 && row + i < nrow && row + i != ocrow) @@ -2145,7 +2147,7 @@ } } - if (len != -1) + if (len >= 0) { /* also comes here at end if needed because of >= above */ if (wlen < len)