mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-26 09:42:25 +00:00
Fix applying combining characters to double-width characters.
[originally from svn r4628]
This commit is contained in:
parent
8d7edeafd3
commit
845138a1e8
22
terminal.c
22
terminal.c
@ -2717,8 +2717,26 @@ void term_out(Terminal *term)
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
case 0:
|
case 0:
|
||||||
add_cc(cline, term->curs.x - !term->wrapnext, c);
|
if (term->curs.x > 0) {
|
||||||
term->seen_disp_event = 1;
|
int x = term->curs.x - 1;
|
||||||
|
|
||||||
|
/* If we're in wrapnext state, the character
|
||||||
|
* to combine with is _here_, not to our left. */
|
||||||
|
if (term->wrapnext)
|
||||||
|
x++;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If the previous character is
|
||||||
|
* UCSWIDE, back up another one.
|
||||||
|
*/
|
||||||
|
if (cline->chars[x].chr == UCSWIDE) {
|
||||||
|
assert(x > 0);
|
||||||
|
x--;
|
||||||
|
}
|
||||||
|
|
||||||
|
add_cc(cline, x, c);
|
||||||
|
term->seen_disp_event = 1;
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
default:
|
default:
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user