mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-05 21:42:47 -05:00
Add line-length limit feature in StripCtrlChars.
Now it can optionally check that output lines don't go beyond a certain length (measured in terminal columns, via wcwidth, rather than bytes or characters). In this mode, lines are prefixed with a distinctive character (namely '|'), and if a line is too long, then it is broken and the continuation line gets a different prefix ('>'). When StripCtrlChars is targeting a terminal, it asks the terminal to call wcwidth on its behalf, so it can be sure to use the same idea as the real terminal about which characters are wide (i.e. depending on the configuration of ambiguous characters). This mode isn't yet used anywhere.
This commit is contained in:
@ -2784,9 +2784,7 @@ static void term_display_graphic_char(Terminal *term, unsigned long c)
|
||||
if (DIRECT_CHAR(c))
|
||||
width = 1;
|
||||
if (!width)
|
||||
width = (term->cjk_ambig_wide ?
|
||||
mk_wcwidth_cjk((unsigned int) c) :
|
||||
mk_wcwidth((unsigned int) c));
|
||||
width = term_char_width(term, c);
|
||||
|
||||
if (term->wrapnext && term->wrap && width > 0) {
|
||||
cline->lattr |= LATTR_WRAPPED;
|
||||
|
Reference in New Issue
Block a user