mirror of
https://github.com/tmux/tmux.git
synced 2025-09-03 06:17:04 +00:00
Allow UTF-8 characters of width 0 to be stored, it is useful to be able
to put padding cells in as width 0.
This commit is contained in:
4
grid.c
4
grid.c
@ -76,7 +76,7 @@ grid_need_extended_cell(const struct grid_cell_entry *gce,
|
||||
return (1);
|
||||
if (gc->attr > 0xff)
|
||||
return (1);
|
||||
if (gc->data.size > 1 || gc->data.width > 1)
|
||||
if (gc->data.size != 1 || gc->data.width != 1)
|
||||
return (1);
|
||||
if ((gc->fg & COLOUR_FLAG_RGB) || (gc->bg & COLOUR_FLAG_RGB))
|
||||
return (1);
|
||||
@ -570,7 +570,7 @@ grid_set_cells(struct grid *gd, u_int px, u_int py, const struct grid_cell *gc,
|
||||
gce = &gl->celldata[px + i];
|
||||
if (grid_need_extended_cell(gce, gc)) {
|
||||
gee = grid_extended_cell(gl, gce, gc);
|
||||
gee->data = utf8_build_one(s[i], 1);
|
||||
gee->data = utf8_build_one(s[i]);
|
||||
} else
|
||||
grid_store_cell(gce, gc, s[i]);
|
||||
}
|
||||
|
Reference in New Issue
Block a user