mirror of
https://github.com/tmux/tmux.git
synced 2025-01-12 03:08:46 +00:00
Don't resize if sx AND sy haven't changed. Also tweak some logging, and reset attrs after clear.
This commit is contained in:
parent
1f9a8e70d9
commit
f2b18ac417
9
screen.c
9
screen.c
@ -1,4 +1,4 @@
|
|||||||
/* $Id: screen.c,v 1.20 2007-10-04 19:03:51 nicm Exp $ */
|
/* $Id: screen.c,v 1.21 2007-10-04 19:22:26 nicm Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||||
@ -74,7 +74,7 @@ screen_resize(struct screen *s, u_int sx, u_int sy)
|
|||||||
{
|
{
|
||||||
u_int i, ox, oy, ny;
|
u_int i, ox, oy, ny;
|
||||||
|
|
||||||
if (sx == s->sx || sy == s->sy)
|
if (sx == s->sx && sy == s->sy)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (sx < 1)
|
if (sx < 1)
|
||||||
@ -84,14 +84,15 @@ screen_resize(struct screen *s, u_int sx, u_int sy)
|
|||||||
|
|
||||||
ox = s->sx;
|
ox = s->sx;
|
||||||
oy = s->sy;
|
oy = s->sy;
|
||||||
|
|
||||||
|
log_debug("resizing screen (%u, %u) -> (%u, %u)", ox, oy, sx, sy);
|
||||||
|
|
||||||
s->sx = sx;
|
s->sx = sx;
|
||||||
s->sy = sy;
|
s->sy = sy;
|
||||||
|
|
||||||
s->ry_upper = 0;
|
s->ry_upper = 0;
|
||||||
s->ry_lower = screen_last_y(s);
|
s->ry_lower = screen_last_y(s);
|
||||||
|
|
||||||
log_debug("resizing screen (%u, %u) -> (%u, %u)", ox, oy, sx, sy);
|
|
||||||
|
|
||||||
if (sy < oy) {
|
if (sy < oy) {
|
||||||
ny = oy - sy;
|
ny = oy - sy;
|
||||||
if (ny > s->cy)
|
if (ny > s->cy)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $Id: server-fn.c,v 1.18 2007-10-04 19:03:51 nicm Exp $ */
|
/* $Id: server-fn.c,v 1.19 2007-10-04 19:22:26 nicm Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||||
@ -160,6 +160,9 @@ server_clear_client(struct client *c)
|
|||||||
input_store_two(c->out, CODE_CURSORMOVE, i + 1, 1);
|
input_store_two(c->out, CODE_CURSORMOVE, i + 1, 1);
|
||||||
input_store_zero(c->out, CODE_CLEARLINE);
|
input_store_zero(c->out, CODE_CLEARLINE);
|
||||||
}
|
}
|
||||||
|
input_store_two(c->out, CODE_CURSORMOVE, s->cy + 1, s->cx + 1);
|
||||||
|
if (s->mode & MODE_CURSOR)
|
||||||
|
input_store_zero(c->out, CODE_CURSORON);
|
||||||
|
|
||||||
size = BUFFER_USED(c->out) - size;
|
size = BUFFER_USED(c->out) - size;
|
||||||
hdr.type = MSG_DATA;
|
hdr.type = MSG_DATA;
|
||||||
|
Loading…
Reference in New Issue
Block a user