mirror of
https://github.com/tmux/tmux.git
synced 2024-11-05 02:18:47 +00:00
Merge branch 'obsd-master'
This commit is contained in:
commit
1d6fe43c7b
7
grid.c
7
grid.c
@ -481,11 +481,10 @@ void
|
|||||||
grid_get_cell(struct grid *gd, u_int px, u_int py, struct grid_cell *gc)
|
grid_get_cell(struct grid *gd, u_int px, u_int py, struct grid_cell *gc)
|
||||||
{
|
{
|
||||||
if (grid_check_y(gd, __func__, py) != 0 ||
|
if (grid_check_y(gd, __func__, py) != 0 ||
|
||||||
px >= gd->linedata[py].cellsize) {
|
px >= gd->linedata[py].cellsize)
|
||||||
memcpy(gc, &grid_default_cell, sizeof *gc);
|
memcpy(gc, &grid_default_cell, sizeof *gc);
|
||||||
return;
|
else
|
||||||
}
|
grid_get_cell1(&gd->linedata[py], px, gc);
|
||||||
return (grid_get_cell1(&gd->linedata[py], px, gc));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set cell at relative position. */
|
/* Set cell at relative position. */
|
||||||
|
7
window.c
7
window.c
@ -1260,16 +1260,17 @@ window_pane_set_mode(struct window_pane *wp, const struct window_mode *mode,
|
|||||||
if (wme->mode == mode)
|
if (wme->mode == mode)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (wme != NULL)
|
if (wme != NULL) {
|
||||||
TAILQ_REMOVE(&wp->modes, wme, entry);
|
TAILQ_REMOVE(&wp->modes, wme, entry);
|
||||||
else {
|
TAILQ_INSERT_HEAD(&wp->modes, wme, entry);
|
||||||
|
} else {
|
||||||
wme = xcalloc(1, sizeof *wme);
|
wme = xcalloc(1, sizeof *wme);
|
||||||
wme->wp = wp;
|
wme->wp = wp;
|
||||||
wme->mode = mode;
|
wme->mode = mode;
|
||||||
wme->prefix = 1;
|
wme->prefix = 1;
|
||||||
|
TAILQ_INSERT_HEAD(&wp->modes, wme, entry);
|
||||||
wme->screen = wme->mode->init(wme, fs, args);
|
wme->screen = wme->mode->init(wme, fs, args);
|
||||||
}
|
}
|
||||||
TAILQ_INSERT_HEAD(&wp->modes, wme, entry);
|
|
||||||
|
|
||||||
wp->screen = wme->screen;
|
wp->screen = wme->screen;
|
||||||
wp->flags |= (PANE_REDRAW|PANE_CHANGED);
|
wp->flags |= (PANE_REDRAW|PANE_CHANGED);
|
||||||
|
Loading…
Reference in New Issue
Block a user