… | |
… | |
2695 | && !ROWCOL_IS_BEFORE (screen.cur, selection.beg) |
2695 | && !ROWCOL_IS_BEFORE (screen.cur, selection.beg) |
2696 | && ROWCOL_IS_BEFORE (screen.cur, selection.end))) |
2696 | && ROWCOL_IS_BEFORE (screen.cur, selection.end))) |
2697 | CLEAR_ALL_SELECTION (); |
2697 | CLEAR_ALL_SELECTION (); |
2698 | } |
2698 | } |
2699 | |
2699 | |
|
|
2700 | void |
|
|
2701 | rxvt_term::selection_changed () NOTHROW |
|
|
2702 | { |
|
|
2703 | line_t &r1 = ROW (selection.beg.row); |
|
|
2704 | while (selection.beg.col > 0 && r1.t [selection.beg.col] == NOCHAR) |
|
|
2705 | --selection.beg.col; |
|
|
2706 | |
|
|
2707 | line_t &r2 = ROW (selection.end.row); |
|
|
2708 | while (selection.end.col < r2.l && r2.t [selection.end.col] == NOCHAR) |
|
|
2709 | ++selection.end.col; |
|
|
2710 | |
|
|
2711 | want_refresh = 1; |
|
|
2712 | } |
|
|
2713 | |
2700 | /* ------------------------------------------------------------------------- */ |
2714 | /* ------------------------------------------------------------------------- */ |
2701 | /* |
2715 | /* |
2702 | * Paste a selection direct to the command fd |
2716 | * Paste a selection direct to the command fd |
2703 | */ |
2717 | */ |
2704 | void |
2718 | void |
… | |
… | |
3005 | * Word select: select text for 2 clicks |
3019 | * Word select: select text for 2 clicks |
3006 | * We now only find out the boundary in one direction |
3020 | * We now only find out the boundary in one direction |
3007 | */ |
3021 | */ |
3008 | |
3022 | |
3009 | /* what do we want: spaces/tabs are delimiters or cutchars or non-cutchars */ |
3023 | /* what do we want: spaces/tabs are delimiters or cutchars or non-cutchars */ |
3010 | #define DELIMIT_TEXT(x) \ |
3024 | #define DELIMIT_TEXT(x) \ |
3011 | (unicode::is_space (x) ? 2 : (x) <= 0xff && !!strchr (rs[Rs_cutchars], (x))) |
3025 | (unicode::is_space (x) ? 2 : (x) <= 0xff && !!strchr (rs[Rs_cutchars], (x))) |
3012 | #define DELIMIT_REND(x) 1 |
3026 | #define DELIMIT_REND(x) 1 |
3013 | |
3027 | |
3014 | void ecb_cold |
3028 | void ecb_cold |
3015 | rxvt_term::selection_delimit_word (enum page_dirn dirn, const row_col_t *mark, row_col_t *ret) NOTHROW |
3029 | rxvt_term::selection_delimit_word (enum page_dirn dirn, const row_col_t *mark, row_col_t *ret) NOTHROW |
… | |
… | |
3136 | { |
3150 | { |
3137 | row_col_t pos; |
3151 | row_col_t pos; |
3138 | enum { |
3152 | enum { |
3139 | LEFT, RIGHT |
3153 | LEFT, RIGHT |
3140 | } closeto = RIGHT; |
3154 | } closeto = RIGHT; |
3141 | |
|
|
3142 | want_refresh = 1; |
|
|
3143 | |
3155 | |
3144 | switch (selection.op) |
3156 | switch (selection.op) |
3145 | { |
3157 | { |
3146 | case SELECTION_INIT: |
3158 | case SELECTION_INIT: |
3147 | CLEAR_SELECTION (); |
3159 | CLEAR_SELECTION (); |
… | |
… | |
3327 | |
3339 | |
3328 | #if !ENABLE_MINIMAL |
3340 | #if !ENABLE_MINIMAL |
3329 | if (selection.rect && selection.beg.col > selection.end.col) |
3341 | if (selection.rect && selection.beg.col > selection.end.col) |
3330 | ::swap (selection.beg.col, selection.end.col); |
3342 | ::swap (selection.beg.col, selection.end.col); |
3331 | #endif |
3343 | #endif |
|
|
3344 | |
|
|
3345 | selection_changed (); |
3332 | } |
3346 | } |
3333 | |
3347 | |
3334 | #if !ENABLE_MINIMAL |
3348 | #if !ENABLE_MINIMAL |
3335 | void ecb_cold |
3349 | void ecb_cold |
3336 | rxvt_term::selection_remove_trailing_spaces () NOTHROW |
3350 | rxvt_term::selection_remove_trailing_spaces () NOTHROW |