… | |
… | |
82 | ROW_AND_COL_IN_ROW_BEFORE ((X).row, (X).col, (Y).row, (Y).col) |
82 | ROW_AND_COL_IN_ROW_BEFORE ((X).row, (X).col, (Y).row, (Y).col) |
83 | #define ROWCOL_IN_ROW_AT_OR_AFTER(X, Y) \ |
83 | #define ROWCOL_IN_ROW_AT_OR_AFTER(X, Y) \ |
84 | ROW_AND_COL_IN_ROW_AT_OR_AFTER ((X).row, (X).col, (Y).row, (Y).col) |
84 | ROW_AND_COL_IN_ROW_AT_OR_AFTER ((X).row, (X).col, (Y).row, (Y).col) |
85 | #define ROWCOL_IN_ROW_AT_OR_BEFORE(X, Y) \ |
85 | #define ROWCOL_IN_ROW_AT_OR_BEFORE(X, Y) \ |
86 | ROW_AND_COL_IN_ROW_AT_OR_BEFORE ((X).row, (X).col, (Y).row, (Y).col) |
86 | ROW_AND_COL_IN_ROW_AT_OR_BEFORE ((X).row, (X).col, (Y).row, (Y).col) |
87 | |
|
|
88 | #define LINENO(n) (((n) + term_start + total_rows) % total_rows) |
|
|
89 | #define ROW(n) (save [LINENO (n)]) |
|
|
90 | |
87 | |
91 | /* |
88 | /* |
92 | * CLEAR_ROWS : clear <num> rows starting from row <row> |
89 | * CLEAR_ROWS : clear <num> rows starting from row <row> |
93 | * CLEAR_CHARS: clear <num> chars starting from pixel position <x,y> |
90 | * CLEAR_CHARS: clear <num> chars starting from pixel position <x,y> |
94 | * ERASE_ROWS : set <num> rows starting from row <row> to the foreground colour |
91 | * ERASE_ROWS : set <num> rows starting from row <row> to the foreground colour |
… | |
… | |
3147 | * flag == 2 ==> button 3 motion |
3144 | * flag == 2 ==> button 3 motion |
3148 | */ |
3145 | */ |
3149 | void |
3146 | void |
3150 | rxvt_term::selection_extend (int x, int y, int flag) |
3147 | rxvt_term::selection_extend (int x, int y, int flag) |
3151 | { |
3148 | { |
3152 | int col = min (max (Pixel2Col (x), 0), nrow - 1); |
3149 | int col = min (max (Pixel2Col (x), 0), ncol); |
3153 | int row = min (max (Pixel2Row (y), 0), ncol); |
3150 | int row = min (max (Pixel2Row (y), 0), nrow - 1); |
3154 | |
3151 | |
3155 | /* |
3152 | /* |
3156 | * If we're selecting characters (single click) then we must check first |
3153 | * If we're selecting characters (single click) then we must check first |
3157 | * if we are at the same place as the original mark. If we are then |
3154 | * if we are at the same place as the original mark. If we are then |
3158 | * select nothing. Otherwise, if we're to the right of the mark, you have to |
3155 | * select nothing. Otherwise, if we're to the right of the mark, you have to |