mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 05:21:10 +00:00
Completely rewrite the reflow code to correctly handle double width
characters (previously they were not accounted for).
This commit is contained in:
11
screen.c
11
screen.c
@ -470,14 +470,5 @@ screen_select_cell(struct screen *s, struct grid_cell *dst,
|
||||
static void
|
||||
screen_reflow(struct screen *s, u_int new_x)
|
||||
{
|
||||
struct grid *old = s->grid;
|
||||
u_int change;
|
||||
|
||||
s->grid = grid_create(old->sx, old->sy, old->hlimit);
|
||||
|
||||
change = grid_reflow(s->grid, old, new_x);
|
||||
if (change < s->cy)
|
||||
s->cy -= change;
|
||||
else
|
||||
s->cy = 0;
|
||||
grid_reflow(s->grid, new_x, &s->cy);
|
||||
}
|
||||
|
Reference in New Issue
Block a user