diff options
author | nicm <nicm> | 2016-09-29 08:50:43 +0000 |
---|---|---|
committer | nicm <nicm> | 2016-09-29 08:50:43 +0000 |
commit | cf7f3a436a216b1c1008edfd767f11dffc02eb2a (patch) | |
tree | e030956b46a748c503d6a54bd6a9b10b1b5f5d5f | |
parent | bb5798aa0e9e1c4c992afab4939fc0ce7c1479c1 (diff) | |
download | rtmux-cf7f3a436a216b1c1008edfd767f11dffc02eb2a.tar.gz rtmux-cf7f3a436a216b1c1008edfd767f11dffc02eb2a.tar.bz2 rtmux-cf7f3a436a216b1c1008edfd767f11dffc02eb2a.zip |
Check padding when writing any character with width > 1, in case they
overlap after the first character (for example with cells xy and ab, y
is replacing a).
-rw-r--r-- | screen-write.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/screen-write.c b/screen-write.c index 94ce359f..2b7fba0b 100644 --- a/screen-write.c +++ b/screen-write.c @@ -1267,10 +1267,10 @@ screen_write_overwrite(struct screen_write_ctx *ctx, struct grid_cell *gc, } /* - * Overwrite any padding cells that belong to a UTF-8 character - * we'll be overwriting with the current character. + * Overwrite any padding cells that belong to any UTF-8 characters we'll be + * overwriting with the current character. */ - if (gc->data.width != 1 || gc->flags & GRID_FLAG_PADDING) { + if (width != 1 || gc->data.width != 1 || gc->flags & GRID_FLAG_PADDING) { xx = s->cx + width - 1; while (++xx < screen_size_x(s)) { grid_view_get_cell(gd, xx, s->cy, &tmp_gc); |