mirror of
https://github.com/tmux/tmux.git
synced 2024-09-30 08:09:01 +00:00
Merge branch 'obsd-master'
This commit is contained in:
commit
fe1778e377
4
grid.c
4
grid.c
@ -48,8 +48,6 @@ static const struct grid_cell_entry grid_cleared_entry = {
|
|||||||
GRID_FLAG_CLEARED, { .data = { 0, 8, 8, ' ' } }
|
GRID_FLAG_CLEARED, { .data = { 0, 8, 8, ' ' } }
|
||||||
};
|
};
|
||||||
|
|
||||||
static void grid_empty_line(struct grid *, u_int, u_int);
|
|
||||||
|
|
||||||
/* Store cell in entry. */
|
/* Store cell in entry. */
|
||||||
static void
|
static void
|
||||||
grid_store_cell(struct grid_cell_entry *gce, const struct grid_cell *gc,
|
grid_store_cell(struct grid_cell_entry *gce, const struct grid_cell *gc,
|
||||||
@ -454,7 +452,7 @@ grid_expand_line(struct grid *gd, u_int py, u_int sx, u_int bg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Empty a line and set background colour if needed. */
|
/* Empty a line and set background colour if needed. */
|
||||||
static void
|
void
|
||||||
grid_empty_line(struct grid *gd, u_int py, u_int bg)
|
grid_empty_line(struct grid *gd, u_int py, u_int bg)
|
||||||
{
|
{
|
||||||
memset(&gd->linedata[py], 0, sizeof gd->linedata[py]);
|
memset(&gd->linedata[py], 0, sizeof gd->linedata[py]);
|
||||||
|
11
screen.c
11
screen.c
@ -313,7 +313,7 @@ screen_resize_y(struct screen *s, u_int sy)
|
|||||||
|
|
||||||
/* Then fill the rest in with blanks. */
|
/* Then fill the rest in with blanks. */
|
||||||
for (i = gd->hsize + sy - needed; i < gd->hsize + sy; i++)
|
for (i = gd->hsize + sy - needed; i < gd->hsize + sy; i++)
|
||||||
memset(grid_get_line(gd, i), 0, sizeof(struct grid_line));
|
grid_empty_line(gd, i, 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set the new size, and reset the scroll region. */
|
/* Set the new size, and reset the scroll region. */
|
||||||
@ -484,9 +484,6 @@ static void
|
|||||||
screen_reflow(struct screen *s, u_int new_x)
|
screen_reflow(struct screen *s, u_int new_x)
|
||||||
{
|
{
|
||||||
u_int cx = s->cx, cy = s->grid->hsize + s->cy, wx, wy;
|
u_int cx = s->cx, cy = s->grid->hsize + s->cy, wx, wy;
|
||||||
struct timeval start, tv;
|
|
||||||
|
|
||||||
gettimeofday(&start, NULL);
|
|
||||||
|
|
||||||
grid_wrap_position(s->grid, cx, cy, &wx, &wy);
|
grid_wrap_position(s->grid, cx, cy, &wx, &wy);
|
||||||
log_debug("%s: cursor %u,%u is %u,%u", __func__, cx, cy, wx, wy);
|
log_debug("%s: cursor %u,%u is %u,%u", __func__, cx, cy, wx, wy);
|
||||||
@ -503,12 +500,6 @@ screen_reflow(struct screen *s, u_int new_x)
|
|||||||
s->cx = 0;
|
s->cx = 0;
|
||||||
s->cy = 0;
|
s->cy = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
gettimeofday(&tv, NULL);
|
|
||||||
timersub(&tv, &start, &tv);
|
|
||||||
|
|
||||||
log_debug("%s: reflow took %llu.%06u seconds", __func__,
|
|
||||||
(unsigned long long)tv.tv_sec, (u_int)tv.tv_usec);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
1
tmux.h
1
tmux.h
@ -2314,6 +2314,7 @@ int attributes_fromstring(const char *);
|
|||||||
|
|
||||||
/* grid.c */
|
/* grid.c */
|
||||||
extern const struct grid_cell grid_default_cell;
|
extern const struct grid_cell grid_default_cell;
|
||||||
|
void grid_empty_line(struct grid *, u_int, u_int);
|
||||||
int grid_cells_equal(const struct grid_cell *, const struct grid_cell *);
|
int grid_cells_equal(const struct grid_cell *, const struct grid_cell *);
|
||||||
struct grid *grid_create(u_int, u_int, u_int);
|
struct grid *grid_create(u_int, u_int, u_int);
|
||||||
void grid_destroy(struct grid *);
|
void grid_destroy(struct grid *);
|
||||||
|
Loading…
Reference in New Issue
Block a user