mirror of
https://github.com/tmux/tmux.git
synced 2026-07-08 02:19:30 +00:00
Do not invoke clear check on respawn.
This commit is contained in:
30
grid.c
30
grid.c
@@ -60,21 +60,6 @@ static const struct grid_cell_entry grid_cleared_entry = {
|
||||
};
|
||||
|
||||
#ifdef __APPLE__
|
||||
static void
|
||||
grid_check_lines(struct grid *gd)
|
||||
{
|
||||
u_int i, j;
|
||||
|
||||
for (i = 0; i < gd->hsize + gd->sy; i++) {
|
||||
for (j = i + 1; j < gd->hsize + gd->sy; j++) {
|
||||
if (gd->linedata[i].celldata != NULL)
|
||||
assert(gd->linedata[i].celldata != gd->linedata[j].celldata);
|
||||
if (gd->linedata[i].extddata != NULL)
|
||||
assert(gd->linedata[i].extddata != gd->linedata[j].extddata);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
grid_check_is_clear(struct grid *gd)
|
||||
{
|
||||
@@ -104,11 +89,6 @@ grid_check_is_clear(struct grid *gd)
|
||||
}
|
||||
}
|
||||
#else
|
||||
static void
|
||||
grid_check_lines(__unused struct grid *gd)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
grid_check_is_clear(__unused struct grid *gd)
|
||||
{
|
||||
@@ -506,8 +486,6 @@ grid_scroll_history(struct grid *gd, u_int bg)
|
||||
gd->linedata[gd->hsize].time = current_time;
|
||||
gd->hsize++;
|
||||
gd->scroll_added++;
|
||||
|
||||
grid_check_lines(gd);
|
||||
}
|
||||
|
||||
/* Clear the history. */
|
||||
@@ -557,8 +535,6 @@ grid_scroll_history_region(struct grid *gd, u_int upper, u_int lower, u_int bg)
|
||||
gd->hscrolled++;
|
||||
gd->hsize++;
|
||||
gd->scroll_added++;
|
||||
|
||||
grid_check_lines(gd);
|
||||
}
|
||||
|
||||
/* Expand line to fit to cell. */
|
||||
@@ -820,8 +796,6 @@ grid_move_lines(struct grid *gd, u_int dy, u_int py, u_int ny, u_int bg)
|
||||
}
|
||||
if (py != 0 && (py < dy || py >= dy + ny))
|
||||
gd->linedata[py - 1].flags &= ~GRID_LINE_WRAPPED;
|
||||
|
||||
grid_check_lines(gd);
|
||||
}
|
||||
|
||||
/* Move a group of cells. */
|
||||
@@ -1311,8 +1285,6 @@ grid_duplicate_lines(struct grid *dst, u_int dy, struct grid *src, u_int sy,
|
||||
sy++;
|
||||
dy++;
|
||||
}
|
||||
|
||||
grid_check_lines(dst);
|
||||
}
|
||||
|
||||
/* Mark line as dead. */
|
||||
@@ -1609,8 +1581,6 @@ grid_reflow(struct grid *gd, u_int sx)
|
||||
gd->linedata = target->linedata;
|
||||
free(target);
|
||||
gd->scroll_generation++;
|
||||
|
||||
grid_check_lines(gd);
|
||||
}
|
||||
|
||||
/* Convert to position based on wrapped lines. */
|
||||
|
||||
7
screen.c
7
screen.c
@@ -99,12 +99,12 @@ screen_init(struct screen *s, u_int sx, u_int sy, u_int hlimit)
|
||||
s->write_list = NULL;
|
||||
s->hyperlinks = NULL;
|
||||
|
||||
screen_reinit(s);
|
||||
screen_reinit(s, 1);
|
||||
}
|
||||
|
||||
/* Reinitialise screen. */
|
||||
void
|
||||
screen_reinit(struct screen *s)
|
||||
screen_reinit(struct screen *s, int check)
|
||||
{
|
||||
s->cx = 0;
|
||||
s->cy = 0;
|
||||
@@ -123,7 +123,8 @@ screen_reinit(struct screen *s)
|
||||
s->saved_cy = UINT_MAX;
|
||||
|
||||
screen_reset_tabs(s);
|
||||
grid_check_is_clear(s->grid);
|
||||
if (check)
|
||||
grid_check_is_clear(s->grid);
|
||||
grid_clear_lines(s->grid, s->grid->hsize, s->grid->sy, 8);
|
||||
|
||||
screen_clear_selection(s);
|
||||
|
||||
2
spawn.c
2
spawn.c
@@ -273,7 +273,7 @@ spawn_pane(struct spawn_context *sc, char **cause)
|
||||
sc->wp0->fd = -1;
|
||||
}
|
||||
window_pane_reset_mode_all(sc->wp0);
|
||||
screen_reinit(&sc->wp0->base);
|
||||
screen_reinit(&sc->wp0->base, 0);
|
||||
if (sc->wp0->ictx != NULL) {
|
||||
input_free(sc->wp0->ictx);
|
||||
sc->wp0->ictx = NULL;
|
||||
|
||||
2
tmux.h
2
tmux.h
@@ -3502,7 +3502,7 @@ int redraw_get_status_border_cell_type(struct redraw_span **, u_int);
|
||||
|
||||
/* screen.c */
|
||||
void screen_init(struct screen *, u_int, u_int, u_int);
|
||||
void screen_reinit(struct screen *);
|
||||
void screen_reinit(struct screen *, int);
|
||||
void screen_free(struct screen *);
|
||||
void screen_reset_tabs(struct screen *);
|
||||
void screen_reset_hyperlinks(struct screen *);
|
||||
|
||||
Reference in New Issue
Block a user