mirror of
https://github.com/tmux/tmux.git
synced 2025-09-01 20:57:00 +00:00
Make sure the cursor position is still on screen after we have trimmed
empty lines. Also improve some log messages.
This commit is contained in:
7
screen.c
7
screen.c
@ -230,7 +230,9 @@ screen_resize_cursor(struct screen *s, u_int sx, u_int sy, int reflow,
|
||||
cy = т
|
||||
*cy = s->grid->hsize + s->cy;
|
||||
|
||||
log_debug("%s: start %u,%u (%u,%u)", __func__, s->cx, s->cy, *cx, *cy);
|
||||
log_debug("%s: new size %ux%u, now %ux%u (cursor %u,%u = %u,%u)",
|
||||
__func__, sx, sy, screen_size_x(s), screen_size_y(s), s->cx, s->cy,
|
||||
*cx, *cy);
|
||||
|
||||
if (sx < 1)
|
||||
sx = 1;
|
||||
@ -256,7 +258,8 @@ screen_resize_cursor(struct screen *s, u_int sx, u_int sy, int reflow,
|
||||
s->cx = 0;
|
||||
s->cy = 0;
|
||||
}
|
||||
log_debug("%s: finish %u,%u (%u,%u)", __func__, s->cx, s->cy, *cx, *cy);
|
||||
log_debug("%s: cursor finished at %u,%u = %u,%u", __func__, s->cx,
|
||||
s->cy, *cx, *cy);
|
||||
}
|
||||
|
||||
/* Resize screen. */
|
||||
|
Reference in New Issue
Block a user