diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2009-08-10 19:42:03 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2009-08-10 19:42:03 +0000 |
commit | 181e1bcffd1f728d0ec32f66b027507857daa598 (patch) | |
tree | 497818248c85a1bec195e608bdbc53246ca577cf /screen-redraw.c | |
parent | fa64c1235e0870e2beea98d090c1a8bcb77588a0 (diff) | |
download | rtmux-181e1bcffd1f728d0ec32f66b027507857daa598.tar.gz rtmux-181e1bcffd1f728d0ec32f66b027507857daa598.tar.bz2 rtmux-181e1bcffd1f728d0ec32f66b027507857daa598.zip |
Reset the attributes after drawing all or part of the screen, and reset the
region before poll(2). This reduces (but does not eliminate) the chance of the
attributes not being normal if tmux is disconnected without warning (ssh ~.,
reboot from inside, etc).
Diffstat (limited to 'screen-redraw.c')
-rw-r--r-- | screen-redraw.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/screen-redraw.c b/screen-redraw.c index eee1c83c..5ee273a5 100644 --- a/screen-redraw.c +++ b/screen-redraw.c @@ -173,6 +173,7 @@ screen_redraw_screen(struct client *c, int status_only) /* If only drawing status and it is present, don't need the rest. */ if (status_only && status) { tty_draw_line(tty, &c->status, 0, 0, tty->sy - 1); + tty_reset(tty); return; } @@ -214,6 +215,7 @@ screen_redraw_screen(struct client *c, int status_only) /* Draw the status line. */ if (status) tty_draw_line(tty, &c->status, 0, 0, tty->sy - 1); + tty_reset(tty); } /* Draw a single pane. */ @@ -224,4 +226,5 @@ screen_redraw_pane(struct client *c, struct window_pane *wp) for (i = 0; i < wp->sy; i++) tty_draw_line(&c->tty, wp->screen, i, wp->xoff, wp->yoff); + tty_reset(&c->tty); } |