--- rxvt-unicode/src/screen.C 2005/12/20 21:49:55 1.177 +++ rxvt-unicode/src/screen.C 2005/12/20 22:47:14 1.179 @@ -85,9 +85,6 @@ #define ROWCOL_IN_ROW_AT_OR_BEFORE(X, Y) \ ROW_AND_COL_IN_ROW_AT_OR_BEFORE ((X).row, (X).col, (Y).row, (Y).col) -#define LINENO(n) (((n) + term_start + total_rows) % total_rows) -#define ROW(n) (save [LINENO (n)]) - /* * CLEAR_ROWS : clear rows starting from row * CLEAR_CHARS: clear chars starting from pixel position @@ -1963,8 +1960,7 @@ showcursor; /* show the cursor */ int16_t col, row, /* column/row we're processing */ ocrow; /* old cursor row */ - int i, /* tmp */ - row_offset; /* basic offset in screen structure */ + int i; /* tmp */ #ifndef NO_CURSORCOLOR rend_t cc1; /* store colours at cursor position (s) */ #endif @@ -1981,8 +1977,6 @@ must_clear = 0; refresh_count = 0; - row_offset = term_start - view_start; - #if XPM_BACKGROUND must_clear |= bgPixmap.pixmap != None; #endif @@ -2109,7 +2103,7 @@ { if (row + i >= 0 && row + i < nrow && row + i != ocrow) { - line_t s = save[(row + row_offset) % total_rows]; + line_t s = ROW(row - view_start); line_t d = drawn[row]; line_t d2 = drawn[row + i]; @@ -2157,8 +2151,8 @@ */ for (row = 0; row < nrow; row++) { - text_t *stp = save[(row + row_offset) % total_rows].t; - rend_t *srp = save[(row + row_offset) % total_rows].r; + text_t *stp = ROW(row - view_start).t; + rend_t *srp = ROW(row - view_start).r; text_t *dtp = drawn[row].t; rend_t *drp = drawn[row].r; @@ -3149,8 +3143,8 @@ void rxvt_term::selection_extend (int x, int y, int flag) { - int col = min (max (Pixel2Col (x), 0), nrow - 1); - int row = min (max (Pixel2Row (y), 0), ncol); + int col = min (max (Pixel2Col (x), 0), ncol); + int row = min (max (Pixel2Row (y), 0), nrow - 1); /* * If we're selecting characters (single click) then we must check first