… | |
… | |
883 | |
883 | |
884 | stp = screen.text[row]; /* _must_ refresh */ |
884 | stp = screen.text[row]; /* _must_ refresh */ |
885 | srp = screen.rend[row]; /* _must_ refresh */ |
885 | srp = screen.rend[row]; /* _must_ refresh */ |
886 | } |
886 | } |
887 | |
887 | |
888 | if (screen.flags & Screen_Insert) |
|
|
889 | scr_insdel_chars (1, INSERT); |
|
|
890 | |
|
|
891 | // rely on wcwidth to tell us the character width, at least for non-latin1 |
888 | // rely on wcwidth to tell us the character width, at least for non-latin1 |
892 | // do wcwidth before further replacements, as wcwidth says that line-drawing |
889 | // do wcwidth before further replacements, as wcwidth says that line-drawing |
893 | // characters have width -1 (DOH!) on GNU/Linux sometimes. |
890 | // characters have width -1 (DOH!) on GNU/Linux sometimes. |
894 | int width = c < 0x100 ? 1 : wcwidth (c); |
891 | int width = c < 0x100 ? 1 : wcwidth (c); |
|
|
892 | |
|
|
893 | if (screen.flags & Screen_Insert) |
|
|
894 | scr_insdel_chars (width, INSERT); |
895 | |
895 | |
896 | if (charsets[screen.charset] == '0') // DEC SPECIAL |
896 | if (charsets[screen.charset] == '0') // DEC SPECIAL |
897 | { |
897 | { |
898 | // vt100 special graphics and line drawing |
898 | // vt100 special graphics and line drawing |
899 | // 5f-7e standard vt100 |
899 | // 5f-7e standard vt100 |
… | |
… | |
1100 | if (count) |
1100 | if (count) |
1101 | x = TermWin.ncol - 1; |
1101 | x = TermWin.ncol - 1; |
1102 | |
1102 | |
1103 | // store horizontal tab commands as characters inside the text |
1103 | // store horizontal tab commands as characters inside the text |
1104 | // buffer so they can be selected and pasted. |
1104 | // buffer so they can be selected and pasted. |
1105 | if (ht) |
1105 | if (ht && options & Opt_pastableTabs) |
1106 | { |
1106 | { |
1107 | base_rend = SET_FONT (base_rend, 0); |
1107 | base_rend = SET_FONT (base_rend, 0); |
1108 | |
1108 | |
1109 | if (screen.tlen[row] != -1) /* XXX: think about this */ |
1109 | if (screen.tlen[row] != -1) /* XXX: think about this */ |
1110 | MAX_IT (screen.tlen[row], x); |
1110 | MAX_IT (screen.tlen[row], x); |
… | |
… | |
2244 | && GET_BGATTR (srp[col]) == GET_BGATTR (drp[col])))) |
2244 | && GET_BGATTR (srp[col]) == GET_BGATTR (drp[col])))) |
2245 | continue; |
2245 | continue; |
2246 | |
2246 | |
2247 | // redraw one or more characters |
2247 | // redraw one or more characters |
2248 | |
2248 | |
2249 | // seek to the beginning if wide characters |
2249 | // seek to the beginning of wide characters |
2250 | while (stp[col] == NOCHAR && col > 0) |
2250 | while (stp[col] == NOCHAR && col > 0) |
2251 | --col; |
2251 | --col; |
2252 | |
2252 | |
2253 | rend_t rend = srp[col]; /* screen rendition (target rendtion) */ |
2253 | rend_t rend = srp[col]; /* screen rendition (target rendtion) */ |
2254 | text_t *text = stp + col; |
2254 | text_t *text = stp + col; |