diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-11-27 21:07:38 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-11-27 21:07:38 +0000 |
commit | c6384a765b1113fbff54bc3f0126b3a578730b36 (patch) | |
tree | 3f39fae37a3c479f550ff9e7da3141298eab1e90 /screen.c | |
parent | 7034ba236f4cbb94753f23747e363644a932221e (diff) | |
download | rtmux-c6384a765b1113fbff54bc3f0126b3a578730b36.tar.gz rtmux-c6384a765b1113fbff54bc3f0126b3a578730b36.tar.bz2 rtmux-c6384a765b1113fbff54bc3f0126b3a578730b36.zip |
Flush data on tty open. Also reset colour before clearing line/screen.
Diffstat (limited to 'screen.c')
-rw-r--r-- | screen.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -1,4 +1,4 @@ -/* $Id: screen.c,v 1.51 2007-11-27 19:32:15 nicm Exp $ */ +/* $Id: screen.c,v 1.52 2007-11-27 21:07:38 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -458,6 +458,7 @@ screen_draw_clear_screen(struct screen_draw_ctx *ctx) { u_int i; + screen_draw_set_attributes(ctx, SCREEN_DEFATTR, SCREEN_DEFCOLR); for (i = 0; i < screen_size_y(ctx->s); i++) { screen_draw_move_cursor(ctx, 0, i); screen_draw_clear_line_to(ctx, screen_size_x(ctx->s)); @@ -568,11 +569,12 @@ screen_draw_line(struct screen_draw_ctx *ctx, u_int py) cx = ctx->s->grid_size[cy]; if (ctx->sel.flag || - screen_size_x(ctx->s) < 3 || cx >= screen_size_x(ctx->s) - 3) + screen_size_x(ctx->s) < 5 || cx >= screen_size_x(ctx->s) - 5) screen_draw_cells(ctx, 0, py, screen_size_x(ctx->s)); else { screen_draw_cells(ctx, 0, py, cx); screen_draw_move_cursor(ctx, cx, py); + screen_draw_set_attributes(ctx, SCREEN_DEFATTR, SCREEN_DEFCOLR); ctx->write(ctx->data, TTY_CLEARENDOFLINE); } } |