mirror of
https://github.com/tmux/tmux.git
synced 2026-05-30 22:26:18 +00:00
Merge branch 'obsd-master'
This commit is contained in:
@@ -624,33 +624,39 @@ screen_write_fast_copy(struct screen_write_ctx *ctx, struct screen *src,
|
|||||||
struct grid_line *gl, *sgl;
|
struct grid_line *gl, *sgl;
|
||||||
struct grid_cell gc;
|
struct grid_cell gc;
|
||||||
u_int xx, yy, cx = s->cx, cy = s->cy;
|
u_int xx, yy, cx = s->cx, cy = s->cy;
|
||||||
|
int yoff = 0;
|
||||||
|
struct visible_ranges *r;
|
||||||
|
|
||||||
if (nx == 0 || ny == 0)
|
if (nx == 0 || ny == 0)
|
||||||
return;
|
return;
|
||||||
|
if (wp != NULL)
|
||||||
|
yoff = wp->yoff;
|
||||||
|
|
||||||
for (yy = py; yy < py + ny; yy++) {
|
for (yy = py; yy < py + ny; yy++) {
|
||||||
if (yy >= gd->hsize + gd->sy)
|
if (yy >= gd->hsize + gd->sy)
|
||||||
break;
|
break;
|
||||||
s->cx = cx;
|
s->cx = cx;
|
||||||
if (wp != NULL)
|
|
||||||
screen_write_initctx(ctx, &ttyctx, 0, 0);
|
screen_write_initctx(ctx, &ttyctx, 0, 0);
|
||||||
|
r = screen_redraw_get_visible_ranges(wp, px, s->cy + yoff, nx,
|
||||||
|
NULL);
|
||||||
for (xx = px; xx < px + nx; xx++) {
|
for (xx = px; xx < px + nx; xx++) {
|
||||||
gl = grid_get_line(gd, yy);
|
gl = grid_get_line(gd, yy);
|
||||||
sgl = grid_get_line(ctx->s->grid, s->cy);
|
sgl = grid_get_line(s->grid, s->cy);
|
||||||
if (xx >= gl->cellsize && s->cx >= sgl->cellsize)
|
if (xx >= gl->cellsize && s->cx >= sgl->cellsize)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
grid_get_cell(gd, xx, yy, &gc);
|
grid_get_cell(gd, xx, yy, &gc);
|
||||||
if (xx + gc.data.width > px + nx)
|
if (xx + gc.data.width > px + nx)
|
||||||
break;
|
break;
|
||||||
grid_view_set_cell(ctx->s->grid, s->cx, s->cy, &gc);
|
grid_view_set_cell(s->grid, s->cx, s->cy, &gc);
|
||||||
if (wp == NULL) {
|
|
||||||
s->cx++;
|
if (!screen_redraw_is_visible(r, px))
|
||||||
continue;
|
break;
|
||||||
}
|
|
||||||
ttyctx.cell = &gc;
|
ttyctx.cell = &gc;
|
||||||
ttyctx.flags &= (TTY_CTX_OVERLAY_SYNC|TTY_CTX_SYNC);
|
ttyctx.flags &= (TTY_CTX_OVERLAY_SYNC|TTY_CTX_SYNC);
|
||||||
tty_write(tty_cmd_cell, &ttyctx);
|
tty_write(tty_cmd_cell, &ttyctx);
|
||||||
ttyctx.ocx++;
|
ttyctx.ocx++;
|
||||||
|
|
||||||
s->cx++;
|
s->cx++;
|
||||||
}
|
}
|
||||||
s->cy++;
|
s->cy++;
|
||||||
|
|||||||
1
tmux.h
1
tmux.h
@@ -3421,6 +3421,7 @@ struct window *window_create(u_int, u_int, u_int, u_int);
|
|||||||
void window_pane_set_event(struct window_pane *);
|
void window_pane_set_event(struct window_pane *);
|
||||||
struct window_pane *window_get_active_at(struct window *, u_int, u_int);
|
struct window_pane *window_get_active_at(struct window *, u_int, u_int);
|
||||||
struct window_pane *window_find_string(struct window *, const char *);
|
struct window_pane *window_find_string(struct window *, const char *);
|
||||||
|
int window_has_floating_panes(struct window *);
|
||||||
int window_has_pane(struct window *, struct window_pane *);
|
int window_has_pane(struct window *, struct window_pane *);
|
||||||
int window_set_active_pane(struct window *, struct window_pane *,
|
int window_set_active_pane(struct window *, struct window_pane *,
|
||||||
int);
|
int);
|
||||||
|
|||||||
12
window.c
12
window.c
@@ -461,6 +461,18 @@ window_pane_send_resize(struct window_pane *wp, u_int sx, u_int sy)
|
|||||||
fatal("ioctl failed");
|
fatal("ioctl failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
window_has_floating_panes(struct window *w)
|
||||||
|
{
|
||||||
|
struct window_pane *wp;
|
||||||
|
|
||||||
|
TAILQ_FOREACH(wp, &w->panes, entry) {
|
||||||
|
if (wp->flags & PANE_FLOATING)
|
||||||
|
return (1);
|
||||||
|
}
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
window_has_pane(struct window *w, struct window_pane *wp)
|
window_has_pane(struct window *w, struct window_pane *wp)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user