*** empty log message ***
authorroot <root>
Tue, 20 Dec 2005 22:27:49 +0000 (22:27 +0000)
committerroot <root>
Tue, 20 Dec 2005 22:27:49 +0000 (22:27 +0000)
src/command.C
src/rxvt.h
src/screen.C

index b8172afffcf7f35d11edf841a81dc09f8497cb02..5b37711b69cd16b24e2c519cfacaf75dfaad496c 100644 (file)
@@ -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
 
index 290fe835549e2f6a954db3b8e01dff91ed8b339a..e2e46866ac721e993cf0f400f683956afd468062 100644 (file)
@@ -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))
index 7819d0876ac3eae92700830084e393a2dd0317ec..c35fe762c4618b0ff6c71b03fe038a3adfdd075c 100644 (file)
@@ -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 <num> rows starting from row <row>
  * CLEAR_CHARS: clear <num> chars starting from pixel position <x,y>
@@ -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