mirror of
https://github.com/tmux/tmux.git
synced 2024-11-17 09:58:52 +00:00
Another fix for insertion from Balazs Kezes. On insertion, size the line
just enough for the inserted characters.
This commit is contained in:
parent
c8bf8ee931
commit
e52d791212
@ -184,9 +184,10 @@ grid_view_insert_cells(struct grid *gd, u_int px, u_int py, u_int nx)
|
|||||||
px = grid_view_x(gd, px);
|
px = grid_view_x(gd, px);
|
||||||
py = grid_view_y(gd, py);
|
py = grid_view_y(gd, py);
|
||||||
|
|
||||||
sx = grid_view_x(gd, gd->linedata[py].cellsize);
|
if (gd->linedata[py].cellsize + nx < gd->sx)
|
||||||
if (sx < px + nx)
|
sx = grid_view_x(gd, gd->linedata[py].cellsize + nx);
|
||||||
sx = px + nx;
|
else
|
||||||
|
sx = grid_view_x(gd, gd->sx);
|
||||||
|
|
||||||
if (px == sx - 1)
|
if (px == sx - 1)
|
||||||
grid_clear(gd, px, py, 1, 1);
|
grid_clear(gd, px, py, 1, 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user