mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-04-28 00:02:10 -05:00
Support combining characters in pre-edit strings
Having the pre-edit string in a termline makes this almost trivial.
This commit is contained in:
parent
d8493c11cd
commit
6532408ba5
@ -8154,6 +8154,16 @@ void term_set_preedit_text(Terminal *term, char *preedit_text)
|
|||||||
case -1:
|
case -1:
|
||||||
/* Ignore control characters. */
|
/* Ignore control characters. */
|
||||||
break;
|
break;
|
||||||
|
case 0:
|
||||||
|
if (width == 0) {
|
||||||
|
width = 1;
|
||||||
|
resizeline(term, term->preedit_termline, width);
|
||||||
|
}
|
||||||
|
if (term->preedit_termline->chars[width - 1].chr == UCSWIDE)
|
||||||
|
add_cc(term->preedit_termline, width - 2, c);
|
||||||
|
else
|
||||||
|
add_cc(term->preedit_termline, width - 1, c);
|
||||||
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
width += 1;
|
width += 1;
|
||||||
resizeline(term, term->preedit_termline, width);
|
resizeline(term, term->preedit_termline, width);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user