--- rxvt-unicode/src/screen.C 2005/12/20 20:58:31 1.176 +++ rxvt-unicode/src/screen.C 2005/12/20 22:27:49 1.178 @@ -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 @@ -641,7 +638,9 @@ want_refresh = 1; num_scr += count; - if (row1 == 0 && count > 0 + if (count > 0 + && row1 == 0 + && row2 == nrow - 1 && (current_screen == PRIMARY || options & Opt_secondaryScroll)) { nsaved = min (nsaved + count, saveLines); @@ -3147,8 +3146,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