mirror of
https://github.com/tmux/tmux.git
synced 2026-06-04 00:56:17 +00:00
Merge branch 'obsd-master'
This commit is contained in:
@@ -1480,6 +1480,7 @@ screen_redraw_draw_scrollbar(struct screen_redraw_ctx *ctx,
|
||||
int px, py, wx, wy, ox, oy, sx, sy, sb_tty_y;
|
||||
int xoff = wp->xoff;
|
||||
int yoff = wp->yoff;
|
||||
int sb_wy = sb_y; /* window coordinates */
|
||||
struct visible_ranges *r;
|
||||
|
||||
/*
|
||||
@@ -1491,9 +1492,8 @@ screen_redraw_draw_scrollbar(struct screen_redraw_ctx *ctx,
|
||||
ox = ctx->ox;
|
||||
oy = ctx->oy;
|
||||
if (ctx->statustop) {
|
||||
sb_y += ctx->statuslines;
|
||||
sy += ctx->statuslines; /* height of window */
|
||||
oy += ctx->statuslines; /* top of window */
|
||||
sb_y += ctx->statuslines; /* tty coordinates */
|
||||
sy += ctx->statuslines;
|
||||
}
|
||||
|
||||
gc = sb_style->gc;
|
||||
@@ -1525,8 +1525,8 @@ screen_redraw_draw_scrollbar(struct screen_redraw_ctx *ctx,
|
||||
}
|
||||
|
||||
/*
|
||||
* sb_y is a window coordinate; convert to tty coordinate by
|
||||
* subtracting the pan offset oy.
|
||||
* sb_y is in tty coordinate (window coord + statuslines when
|
||||
* statustop). Subtract the pan offset oy to get the tty row.
|
||||
*/
|
||||
sb_tty_y = sb_y - oy; /* scrollbar top in tty coordinates */
|
||||
if (sb_tty_y > (int)sy) {
|
||||
@@ -1548,7 +1548,7 @@ screen_redraw_draw_scrollbar(struct screen_redraw_ctx *ctx,
|
||||
}
|
||||
|
||||
for (j = jmin; j < jmax; j++) {
|
||||
wy = sb_y + j; /* window y coordinate */
|
||||
wy = sb_wy + j; /* window y coordinate */
|
||||
py = sb_tty_y + j; /* tty y coordinate */
|
||||
r = tty_check_overlay_range(tty, sb_x, wy, imax);
|
||||
r = screen_redraw_get_visible_ranges(wp, sb_x, wy, imax, r);
|
||||
|
||||
4
spawn.c
4
spawn.c
@@ -269,7 +269,8 @@ spawn_pane(struct spawn_context *sc, char **cause)
|
||||
sc->wp0->ictx = NULL;
|
||||
new_wp = sc->wp0;
|
||||
new_wp->flags &= ~(PANE_STATUSREADY|PANE_STATUSDRAWN);
|
||||
} else if (sc->lc == NULL) {
|
||||
} else {
|
||||
if (sc->lc == NULL) {
|
||||
new_wp = window_add_pane(w, NULL, hlimit, sc->flags);
|
||||
layout_init(w, new_wp);
|
||||
} else {
|
||||
@@ -286,6 +287,7 @@ spawn_pane(struct spawn_context *sc, char **cause)
|
||||
*/
|
||||
if (w->flags & WINDOW_ZOOMED)
|
||||
new_wp->saved_layout_cell = new_wp->layout_cell;
|
||||
}
|
||||
|
||||
/*
|
||||
* Now we have a pane with nothing running in it ready for the new
|
||||
|
||||
7
window.c
7
window.c
@@ -644,17 +644,12 @@ window_get_active_at(struct window *w, u_int x, u_int y)
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
/* Floating - include top or or left border. */
|
||||
/* Floating - include all borders. */
|
||||
if ((int)x < xoff - 1 || x > xoff + sx)
|
||||
continue;
|
||||
if (pane_status == PANE_STATUS_TOP) {
|
||||
if ((int)y <= yoff - 2 || y > yoff + sy - 1)
|
||||
continue;
|
||||
} else {
|
||||
if ((int)y < yoff - 1 || y > yoff + sy)
|
||||
continue;
|
||||
}
|
||||
}
|
||||
return (wp);
|
||||
}
|
||||
return (NULL);
|
||||
|
||||
Reference in New Issue
Block a user