… | |
… | |
107 | } |
107 | } |
108 | |
108 | |
109 | l.touch (); |
109 | l.touch (); |
110 | |
110 | |
111 | efs &= ~RS_baseattrMask; // remove italic etc. fontstyles |
111 | efs &= ~RS_baseattrMask; // remove italic etc. fontstyles |
112 | efs = SET_FONT (efs, FONTSET (efs)->find_font (' ')); |
112 | efs = SET_FONT (efs, FONTSET (efs)->find_space_font ()); |
113 | |
113 | |
114 | text_t *et = l.t + col; |
114 | text_t *et = l.t + col; |
115 | rend_t *er = l.r + col; |
115 | rend_t *er = l.r + col; |
116 | |
116 | |
117 | while (width--) |
117 | while (width--) |
… | |
… | |
139 | // find begin |
139 | // find begin |
140 | while (col > 0 && l.t[col] == NOCHAR) |
140 | while (col > 0 && l.t[col] == NOCHAR) |
141 | col--; |
141 | col--; |
142 | |
142 | |
143 | rend_t rend = l.r[col] & ~RS_baseattrMask; |
143 | rend_t rend = l.r[col] & ~RS_baseattrMask; |
144 | rend = SET_FONT (rend, FONTSET (rend)->find_font (' ')); |
144 | rend = SET_FONT (rend, FONTSET (rend)->find_space_font ()); |
145 | |
145 | |
146 | l.touch (); |
146 | l.touch (); |
147 | |
147 | |
148 | // found start, nuke |
148 | // found start, nuke |
149 | do { |
149 | do { |
… | |
… | |
304 | |
304 | |
305 | int p = MOD (term_start + prev_nrow, prev_total_rows); // previous row |
305 | int p = MOD (term_start + prev_nrow, prev_total_rows); // previous row |
306 | int pend = MOD (term_start + top_row , prev_total_rows); |
306 | int pend = MOD (term_start + top_row , prev_total_rows); |
307 | int q = total_rows; // rewrapped row |
307 | int q = total_rows; // rewrapped row |
308 | |
308 | |
309 | if (top_row) |
309 | if ((rewrap_always || top_row) && !rewrap_never) |
310 | { |
310 | { |
311 | // Re-wrap lines. This is rather ugly, possibly because I am too dumb |
311 | // Re-wrap lines. This is rather ugly, possibly because I am too dumb |
312 | // to come up with a lean and mean algorithm. |
312 | // to come up with a lean and mean algorithm. |
313 | // TODO: maybe optimise when width didn't change |
313 | // TODO: maybe optimise when width didn't change |
314 | |
314 | |
… | |
… | |
2714 | /* convert normal newline chars into common keyboard Return key sequence */ |
2714 | /* convert normal newline chars into common keyboard Return key sequence */ |
2715 | for (unsigned int i = 0; i < len; i++) |
2715 | for (unsigned int i = 0; i < len; i++) |
2716 | if (data[i] == C0_LF) |
2716 | if (data[i] == C0_LF) |
2717 | data[i] = C0_CR; |
2717 | data[i] = C0_CR; |
2718 | |
2718 | |
2719 | if (priv_modes & PrivMode_BracketPaste) |
2719 | #if ENABLE_FRILLS |
|
|
2720 | if ((priv_modes & PrivMode_BracketPaste) && !option (Opt_disablePasteBrackets)) |
2720 | tt_printf ("\x1b[200~"); |
2721 | tt_printf ("\x1b[200~"); |
|
|
2722 | #endif |
2721 | |
2723 | |
2722 | tt_write (data, len); |
2724 | tt_write (data, len); |
2723 | |
2725 | |
2724 | if (priv_modes & PrivMode_BracketPaste) |
2726 | #if ENABLE_FRILLS |
|
|
2727 | if ((priv_modes & PrivMode_BracketPaste) && !option (Opt_disablePasteBrackets)) |
2725 | tt_printf ("\x1b[201~"); |
2728 | tt_printf ("\x1b[201~"); |
|
|
2729 | #endif |
2726 | } |
2730 | } |
2727 | |
2731 | |
2728 | void |
2732 | void |
2729 | rxvt_term::paste (char *data, unsigned int len) noexcept |
2733 | rxvt_term::paste (char *data, unsigned int len) noexcept |
2730 | { |
2734 | { |