mirror of
https://github.com/tmux/tmux.git
synced 2026-06-20 17:25:57 +00:00
Move checking of whether the cursor is visible inside the if so that it
always hits the calculation of the oy offset when the status line is at the top. From Michael Grant.
This commit is contained in:
@@ -1819,13 +1819,14 @@ server_client_reset_state(struct client *c)
|
|||||||
cx = wp->xoff + (int)s->cx - (int)ox;
|
cx = wp->xoff + (int)s->cx - (int)ox;
|
||||||
cy = wp->yoff + (int)s->cy - (int)oy;
|
cy = wp->yoff + (int)s->cy - (int)oy;
|
||||||
|
|
||||||
if (status_at_line(c) == 0)
|
|
||||||
cy += status_line_size(c);
|
|
||||||
}
|
|
||||||
r = screen_redraw_get_visible_ranges(wp, cx, cy, 1, NULL);
|
r = screen_redraw_get_visible_ranges(wp, cx, cy, 1, NULL);
|
||||||
if (!screen_redraw_is_visible(r, cx))
|
if (!screen_redraw_is_visible(r, cx))
|
||||||
cursor = 0;
|
cursor = 0;
|
||||||
|
|
||||||
|
if (status_at_line(c) == 0)
|
||||||
|
cy += status_line_size(c);
|
||||||
|
}
|
||||||
|
|
||||||
if (!cursor)
|
if (!cursor)
|
||||||
mode &= ~MODE_CURSOR;
|
mode &= ~MODE_CURSOR;
|
||||||
} else if (c->overlay_mode == NULL || s == NULL)
|
} else if (c->overlay_mode == NULL || s == NULL)
|
||||||
|
|||||||
Reference in New Issue
Block a user