… | |
… | |
1114 | * Process DEC Back Index |
1114 | * Process DEC Back Index |
1115 | * XTERM_SEQ: ESC 6 |
1115 | * XTERM_SEQ: ESC 6 |
1116 | * Move cursor left in row. If we're at the left boundary, shift everything |
1116 | * Move cursor left in row. If we're at the left boundary, shift everything |
1117 | * in that row right. Clear left column. |
1117 | * in that row right. Clear left column. |
1118 | */ |
1118 | */ |
1119 | #if ENABLE_FRILLS |
1119 | #if !ENABLE_MINIMAL |
1120 | void |
1120 | void |
1121 | rxvt_term::scr_backindex () NOTHROW |
1121 | rxvt_term::scr_backindex () NOTHROW |
1122 | { |
1122 | { |
1123 | if (screen.cur.col > 0) |
1123 | if (screen.cur.col > 0) |
1124 | scr_gotorc (0, -1, R_RELATIVE | C_RELATIVE); |
1124 | scr_gotorc (0, -1, R_RELATIVE | C_RELATIVE); |
… | |
… | |
1131 | * Process DEC Forward Index |
1131 | * Process DEC Forward Index |
1132 | * XTERM_SEQ: ESC 9 |
1132 | * XTERM_SEQ: ESC 9 |
1133 | * Move cursor right in row. If we're at the right boundary, shift everything |
1133 | * Move cursor right in row. If we're at the right boundary, shift everything |
1134 | * in that row left. Clear right column. |
1134 | * in that row left. Clear right column. |
1135 | */ |
1135 | */ |
1136 | #if ENABLE_FRILLS |
1136 | #if !ENABLE_MINIMAL |
1137 | void |
1137 | void |
1138 | rxvt_term::scr_forwardindex () NOTHROW |
1138 | rxvt_term::scr_forwardindex () NOTHROW |
1139 | { |
1139 | { |
1140 | if (screen.cur.col < ncol - 1) |
1140 | if (screen.cur.col < ncol - 1) |
1141 | scr_gotorc (0, 1, R_RELATIVE | C_RELATIVE); |
1141 | scr_gotorc (0, 1, R_RELATIVE | C_RELATIVE); |
… | |
… | |
1355 | scr_blank_screen_mem (ROW(row), rstyle); |
1355 | scr_blank_screen_mem (ROW(row), rstyle); |
1356 | scr_blank_line (drawn_buf [row], 0, ncol, ren); |
1356 | scr_blank_line (drawn_buf [row], 0, ncol, ren); |
1357 | } |
1357 | } |
1358 | } |
1358 | } |
1359 | |
1359 | |
1360 | #if ENABLE_FRILLS |
1360 | #if !ENABLE_MINIMAL |
1361 | void |
1361 | void |
1362 | rxvt_term::scr_erase_savelines () NOTHROW |
1362 | rxvt_term::scr_erase_savelines () NOTHROW |
1363 | { |
1363 | { |
1364 | want_refresh = 1; |
1364 | want_refresh = 1; |
1365 | ZERO_SCROLLBACK (); |
1365 | ZERO_SCROLLBACK (); |
… | |
… | |
2548 | { |
2548 | { |
2549 | if (selection.op |
2549 | if (selection.op |
2550 | && current_screen == selection.screen |
2550 | && current_screen == selection.screen |
2551 | && selection.end.row >= view_start) |
2551 | && selection.end.row >= view_start) |
2552 | { |
2552 | { |
2553 | #if ENABLE_FRILLS |
2553 | #if !ENABLE_MINIMAL |
2554 | if (selection.rect) |
2554 | if (selection.rect) |
2555 | scr_xor_rect (selection.beg.row, selection.beg.col, |
2555 | scr_xor_rect (selection.beg.row, selection.beg.col, |
2556 | selection.end.row, selection.end.col, |
2556 | selection.end.row, selection.end.col, |
2557 | RS_RVid, RS_RVid | RS_Uline); |
2557 | RS_RVid, RS_RVid | RS_Uline); |
2558 | else |
2558 | else |
… | |
… | |
2773 | } |
2773 | } |
2774 | |
2774 | |
2775 | char **cl; |
2775 | char **cl; |
2776 | int cr; |
2776 | int cr; |
2777 | |
2777 | |
2778 | #if ENABLE_FRILLS |
2778 | #if !ENABLE_MINIMAL |
2779 | // xlib is horribly broken with respect to UTF8_STRING, and nobody cares to fix it |
2779 | // xlib is horribly broken with respect to UTF8_STRING, and nobody cares to fix it |
2780 | // so recode it manually |
2780 | // so recode it manually |
2781 | if (ct.encoding == xa[XA_UTF8_STRING]) |
2781 | if (ct.encoding == xa[XA_UTF8_STRING]) |
2782 | { |
2782 | { |
2783 | wchar_t *w = rxvt_utf8towcs ((const char *)ct.value, ct.nitems); |
2783 | wchar_t *w = rxvt_utf8towcs ((const char *)ct.value, ct.nitems); |
… | |
… | |
2954 | |
2954 | |
2955 | int end_col; |
2955 | int end_col; |
2956 | |
2956 | |
2957 | for (; row <= selection.end.row; row++, col = 0) |
2957 | for (; row <= selection.end.row; row++, col = 0) |
2958 | { |
2958 | { |
2959 | #if ENABLE_FRILLS |
2959 | #if !ENABLE_MINIMAL |
2960 | if (selection.rect) |
2960 | if (selection.rect) |
2961 | { |
2961 | { |
2962 | col = selection.beg.col; |
2962 | col = selection.beg.col; |
2963 | end_col = ncol + 1; |
2963 | end_col = ncol + 1; |
2964 | } |
2964 | } |
… | |
… | |
2967 | end_col = ROW(row).l; |
2967 | end_col = ROW(row).l; |
2968 | |
2968 | |
2969 | col = max (col, 0); |
2969 | col = max (col, 0); |
2970 | |
2970 | |
2971 | if (row == selection.end.row |
2971 | if (row == selection.end.row |
2972 | #if ENABLE_FRILLS |
2972 | #if !ENABLE_MINIMAL |
2973 | || selection.rect |
2973 | || selection.rect |
2974 | #endif |
2974 | #endif |
2975 | ) |
2975 | ) |
2976 | min_it (end_col, selection.end.col); |
2976 | min_it (end_col, selection.end.col); |
2977 | |
2977 | |
… | |
… | |
3000 | #endif |
3000 | #endif |
3001 | else |
3001 | else |
3002 | new_selection_text[ofs++] = *t++; |
3002 | new_selection_text[ofs++] = *t++; |
3003 | } |
3003 | } |
3004 | |
3004 | |
3005 | #if ENABLE_FRILLS |
3005 | #if !ENABLE_MINIMAL |
3006 | if (selection.rect) |
3006 | if (selection.rect) |
3007 | { |
3007 | { |
3008 | while (ofs |
3008 | while (ofs |
3009 | && new_selection_text[ofs - 1] != C0_LF |
3009 | && new_selection_text[ofs - 1] != C0_LF |
3010 | && unicode::is_space (new_selection_text[ofs - 1])) |
3010 | && unicode::is_space (new_selection_text[ofs - 1])) |
… | |
… | |
3371 | |
3371 | |
3372 | if (selection.clicks == 1) |
3372 | if (selection.clicks == 1) |
3373 | { |
3373 | { |
3374 | if (selection.beg.col > ROW(selection.beg.row).l //TODO//FIXME//LEN |
3374 | if (selection.beg.col > ROW(selection.beg.row).l //TODO//FIXME//LEN |
3375 | && !ROW(selection.beg.row).is_longer () |
3375 | && !ROW(selection.beg.row).is_longer () |
3376 | #if ENABLE_FRILLS |
3376 | #if !ENABLE_MINIMAL |
3377 | && !selection.rect |
3377 | && !selection.rect |
3378 | #endif |
3378 | #endif |
3379 | ) |
3379 | ) |
3380 | selection.beg.col = ncol; |
3380 | selection.beg.col = ncol; |
3381 | |
3381 | |
3382 | if ( |
3382 | if ( |
3383 | selection.end.col > ROW(selection.end.row).l //TODO//FIXME//LEN |
3383 | selection.end.col > ROW(selection.end.row).l //TODO//FIXME//LEN |
3384 | && !ROW(selection.end.row).is_longer () |
3384 | && !ROW(selection.end.row).is_longer () |
3385 | #if ENABLE_FRILLS |
3385 | #if !ENABLE_MINIMAL |
3386 | && !selection.rect |
3386 | && !selection.rect |
3387 | #endif |
3387 | #endif |
3388 | ) |
3388 | ) |
3389 | selection.end.col = ncol; |
3389 | selection.end.col = ncol; |
3390 | } |
3390 | } |
… | |
… | |
3407 | { |
3407 | { |
3408 | if (!ROW(end_row).is_longer ()) |
3408 | if (!ROW(end_row).is_longer ()) |
3409 | { |
3409 | { |
3410 | selection.end.row = end_row; |
3410 | selection.end.row = end_row; |
3411 | selection.end.col = ROW(end_row).l; |
3411 | selection.end.col = ROW(end_row).l; |
|
|
3412 | # if !ENABLE_MINIMAL |
3412 | selection_remove_trailing_spaces (); |
3413 | selection_remove_trailing_spaces (); |
|
|
3414 | # endif |
3413 | break; |
3415 | break; |
3414 | } |
3416 | } |
3415 | } |
3417 | } |
3416 | } |
3418 | } |
3417 | else |
3419 | else |
… | |
… | |
3446 | selection.mark.row = selection.beg.row; |
3448 | selection.mark.row = selection.beg.row; |
3447 | selection.mark.col = selection.beg.col; |
3449 | selection.mark.col = selection.beg.col; |
3448 | } |
3450 | } |
3449 | } |
3451 | } |
3450 | |
3452 | |
3451 | #if ENABLE_FRILLS |
3453 | #if !ENABLE_MINIMAL |
3452 | if (selection.rect && selection.beg.col > selection.end.col) |
3454 | if (selection.rect && selection.beg.col > selection.end.col) |
3453 | ::swap (selection.beg.col, selection.end.col); |
3455 | ::swap (selection.beg.col, selection.end.col); |
3454 | #endif |
3456 | #endif |
3455 | } |
3457 | } |
3456 | |
3458 | |
3457 | #if ENABLE_FRILLS |
3459 | #if !ENABLE_MINIMAL |
3458 | void |
3460 | void |
3459 | rxvt_term::selection_remove_trailing_spaces () NOTHROW |
3461 | rxvt_term::selection_remove_trailing_spaces () NOTHROW |
3460 | { |
3462 | { |
3461 | int32_t end_col, end_row; |
3463 | int32_t end_col, end_row; |
3462 | text_t *stp; |
3464 | text_t *stp; |
… | |
… | |
3587 | style = enc_string; |
3589 | style = enc_string; |
3588 | else if (target == xa[XA_TEXT]) |
3590 | else if (target == xa[XA_TEXT]) |
3589 | style = enc_text; |
3591 | style = enc_text; |
3590 | else if (target == xa[XA_COMPOUND_TEXT]) |
3592 | else if (target == xa[XA_COMPOUND_TEXT]) |
3591 | style = enc_compound_text; |
3593 | style = enc_compound_text; |
3592 | #if ENABLE_FRILLS |
3594 | #if !ENABLE_MINIMAL |
3593 | else if (target == xa[XA_UTF8_STRING]) |
3595 | else if (target == xa[XA_UTF8_STRING]) |
3594 | style = enc_utf8; |
3596 | style = enc_utf8; |
3595 | #endif |
3597 | #endif |
3596 | else |
3598 | else |
3597 | { |
3599 | { |
… | |
… | |
3608 | { |
3610 | { |
3609 | cl = L""; |
3611 | cl = L""; |
3610 | selectlen = 0; |
3612 | selectlen = 0; |
3611 | } |
3613 | } |
3612 | |
3614 | |
3613 | #if ENABLE_FRILLS |
3615 | #if !ENABLE_MINIMAL |
3614 | // xlib is horribly broken with respect to UTF8_STRING, and nobody cares to fix it |
3616 | // xlib is horribly broken with respect to UTF8_STRING, and nobody cares to fix it |
3615 | // so recode it manually |
3617 | // so recode it manually |
3616 | if (style == enc_utf8) |
3618 | if (style == enc_utf8) |
3617 | { |
3619 | { |
3618 | freect = 1; |
3620 | freect = 1; |