1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-04-22 21:45:03 -05:00

Initialise pre-edit character cells to basic_erase_char

This ensures that they have sensible attributes (not black on black)
and is simpler than initialising the fields by hand.
This commit is contained in:
Ben Harris 2025-04-02 01:21:40 +01:00
parent 3ab279fae5
commit f9928fb7d5

View File

@ -6131,12 +6131,8 @@ static void do_paint(Terminal *term)
preedit_start = preedit_end - preedit_width;
}
for (j = 0; j < preedit_width; j++) {
/* FULL-TERMCHAR */
preedit_termchars[j] = term->basic_erase_char;
preedit_termchars[j].chr = !j ? term->preedit_char : UCSWIDE;
preedit_termchars[j].attr = 0;
preedit_termchars[j].truecolour.fg.enabled = false;
preedit_termchars[j].truecolour.bg.enabled = false;
preedit_termchars[j].cc_next = 0;
}
our_curs_x = preedit_start;
}