From: root Date: Tue, 20 Dec 2005 22:27:49 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=59e216c35c5ef3de324cb69879f12da753d9964b;p=dana%2Furxvt.git *** empty log message *** --- diff --git a/src/command.C b/src/command.C index b8172aff..5b37711b 100644 --- a/src/command.C +++ b/src/command.C @@ -137,13 +137,13 @@ rxvt_term::iso14755_54 (int x, int y) x = Pixel2Col (x); y = Pixel2Row (y); - if (x < 0 || x >= ncol - || y < 0 || y >= nrow) + if (!IN_RANGE_EXC (x, 0, ncol) + || !IN_RANGE_EXC (y, 0, nrow)) return; for (;;) { - const line_t &l = save[y + saveLines - view_start]; + const line_t &l = ROW(-view_start); text_t t = l.t[x]; @@ -156,7 +156,6 @@ rxvt_term::iso14755_54 (int x, int y) x--; } - } #endif diff --git a/src/rxvt.h b/src/rxvt.h index 290fe835..e2e46866 100644 --- a/src/rxvt.h +++ b/src/rxvt.h @@ -827,8 +827,11 @@ enum { #define Width2Pixel(n) ((int32_t)(n) * (int32_t)fwidth) #define Height2Pixel(n) ((int32_t)(n) * (int32_t)fheight) -#define TermWin_TotalWidth() ((int32_t)width) -#define TermWin_TotalHeight() ((int32_t)height) +#define TermWin_TotalWidth() ((int32_t)this->width) +#define TermWin_TotalHeight() ((int32_t)this->height) + +#define LINENO(n) (((n) + term_start + total_rows) % total_rows) +#define ROW(n) (save [LINENO (n)]) /* how to build & extract colors and attributes */ #define GET_BASEFG(x) (((x) & RS_fgMask)) diff --git a/src/screen.C b/src/screen.C index 7819d087..c35fe762 100644 --- a/src/screen.C +++ b/src/screen.C @@ -85,9 +85,6 @@ inline void fill_text (text_t *start, text_t value, int len) #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 @@ -3149,8 +3146,8 @@ Old_Word_Selection_You_Die: 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