Clear to end of line properly with UTF-8 present.

pull/1103/merge
nicm 2017-10-11 11:26:58 +00:00
parent 99351c9cae
commit 6e5121be7e
1 changed files with 5 additions and 3 deletions

View File

@ -554,10 +554,12 @@ mode_tree_draw(struct mode_tree_data *mtd)
} }
if (i != mtd->current) { if (i != mtd->current) {
screen_write_puts(&ctx, &gc0, "%.*s", w, text); screen_write_nputs(&ctx, w, &gc0, "%s", text);
screen_write_clearendofline(&ctx, 8); screen_write_clearendofline(&ctx, 8);
} else } else {
screen_write_puts(&ctx, &gc, "%-*.*s", w, w, text); screen_write_nputs(&ctx, w, &gc, "%s", text);
screen_write_clearendofline(&ctx, gc.bg);
}
free(text); free(text);
if (mti->tagged) { if (mti->tagged) {