mirror of
https://github.com/tmux/tmux.git
synced 2026-03-09 17:30:16 +00:00
Merge branch 'obsd-master'
This commit is contained in:
@@ -370,7 +370,7 @@ cmd_display_menu_exec(struct cmd *self, struct cmdq_item *item)
|
|||||||
flags |= MENU_NOMOUSE;
|
flags |= MENU_NOMOUSE;
|
||||||
if (menu_display(menu, flags, starting_choice, item, px, py, tc, lines,
|
if (menu_display(menu, flags, starting_choice, item, px, py, tc, lines,
|
||||||
style, selected_style, border_style, target, NULL, NULL) != 0)
|
style, selected_style, border_style, target, NULL, NULL) != 0)
|
||||||
return (CMD_RETURN_NORMAL);
|
goto out;
|
||||||
return (CMD_RETURN_WAIT);
|
return (CMD_RETURN_WAIT);
|
||||||
|
|
||||||
out:
|
out:
|
||||||
|
|||||||
11
grid.c
11
grid.c
@@ -495,7 +495,7 @@ static void
|
|||||||
grid_expand_line(struct grid *gd, u_int py, u_int sx, u_int bg)
|
grid_expand_line(struct grid *gd, u_int py, u_int sx, u_int bg)
|
||||||
{
|
{
|
||||||
struct grid_line *gl;
|
struct grid_line *gl;
|
||||||
u_int xx, old_cellsize;
|
u_int xx;
|
||||||
|
|
||||||
gl = &gd->linedata[py];
|
gl = &gd->linedata[py];
|
||||||
if (sx <= gl->cellsize)
|
if (sx <= gl->cellsize)
|
||||||
@@ -508,10 +508,13 @@ grid_expand_line(struct grid *gd, u_int py, u_int sx, u_int bg)
|
|||||||
else if (gd->sx > sx)
|
else if (gd->sx > sx)
|
||||||
sx = gd->sx;
|
sx = gd->sx;
|
||||||
|
|
||||||
old_cellsize = gl->cellsize;
|
gl->celldata = xreallocarray(gl->celldata, sx,
|
||||||
gl->celldata = xrecallocarray(gl->celldata, old_cellsize, sx,
|
|
||||||
sizeof *gl->celldata);
|
sizeof *gl->celldata);
|
||||||
for (xx = old_cellsize; xx < sx; xx++)
|
if (gl->cellsize < sx) {
|
||||||
|
memset(gl->celldata + gl->cellsize, 0,
|
||||||
|
(sx - gl->cellsize) * sizeof *gl->celldata);
|
||||||
|
}
|
||||||
|
for (xx = gl->cellsize; xx < sx; xx++)
|
||||||
grid_clear_cell(gd, xx, py, bg);
|
grid_clear_cell(gd, xx, py, bg);
|
||||||
gl->cellsize = sx;
|
gl->cellsize = sx;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user