mirror of
https://github.com/tmux/tmux.git
synced 2025-01-07 16:28:48 +00:00
Fix UTF-8 combining characters in column 0, based on a diff from Keith
Winstein.
This commit is contained in:
parent
0f2f783584
commit
a2dd7daf4e
@ -1316,12 +1316,12 @@ screen_write_combine(struct screen_write_ctx *ctx, const struct utf8_data *ud,
|
|||||||
fatalx("UTF-8 data empty");
|
fatalx("UTF-8 data empty");
|
||||||
|
|
||||||
/* Retrieve the previous cell. */
|
/* Retrieve the previous cell. */
|
||||||
for (n = 1; n < s->cx; n++) {
|
for (n = 1; n <= s->cx; n++) {
|
||||||
grid_view_get_cell(gd, s->cx - n, s->cy, &gc);
|
grid_view_get_cell(gd, s->cx - n, s->cy, &gc);
|
||||||
if (~gc.flags & GRID_FLAG_PADDING)
|
if (~gc.flags & GRID_FLAG_PADDING)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (n == s->cx)
|
if (n > s->cx)
|
||||||
return (NULL);
|
return (NULL);
|
||||||
*xx = s->cx - n;
|
*xx = s->cx - n;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user