… | |
… | |
2679 | /* ------------------------------------------------------------------------- */ |
2679 | /* ------------------------------------------------------------------------- */ |
2680 | /* |
2680 | /* |
2681 | * Paste a selection direct to the command fd |
2681 | * Paste a selection direct to the command fd |
2682 | */ |
2682 | */ |
2683 | void |
2683 | void |
2684 | rxvt_term::paste (char *data, unsigned int len) NOTHROW |
2684 | rxvt_term::tt_paste (char *data, unsigned int len) NOTHROW |
2685 | { |
2685 | { |
2686 | /* convert normal newline chars into common keyboard Return key sequence */ |
2686 | /* convert normal newline chars into common keyboard Return key sequence */ |
2687 | for (unsigned int i = 0; i < len; i++) |
2687 | for (unsigned int i = 0; i < len; i++) |
2688 | if (data[i] == C0_LF) |
2688 | if (data[i] == C0_LF) |
2689 | data[i] = C0_CR; |
2689 | data[i] = C0_CR; |
… | |
… | |
2693 | |
2693 | |
2694 | tt_write (data, len); |
2694 | tt_write (data, len); |
2695 | |
2695 | |
2696 | if (priv_modes & PrivMode_BracketPaste) |
2696 | if (priv_modes & PrivMode_BracketPaste) |
2697 | tt_printf ("\e[201~"); |
2697 | tt_printf ("\e[201~"); |
|
|
2698 | } |
|
|
2699 | |
|
|
2700 | void |
|
|
2701 | rxvt_term::paste (char *data, unsigned int len) NOTHROW |
|
|
2702 | { |
|
|
2703 | if (HOOK_INVOKE ((this, HOOK_TT_PASTE, DT_STR_LEN, data, len, DT_END))) |
|
|
2704 | return; |
|
|
2705 | |
|
|
2706 | tt_paste (data, len); |
2698 | } |
2707 | } |
2699 | |
2708 | |
2700 | /* ------------------------------------------------------------------------- */ |
2709 | /* ------------------------------------------------------------------------- */ |
2701 | /* |
2710 | /* |
2702 | * Respond to a notification that a primary selection has been sent |
2711 | * Respond to a notification that a primary selection has been sent |