diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2008-01-03 19:18:14 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2008-01-03 19:18:14 +0000 |
commit | e7f68a089eec93799c098c570c03047f84638a73 (patch) | |
tree | 83a68949ccd211c366d317904299b56e34177eb1 | |
parent | ccfeb316a674370778390dc3192045fbe18113fe (diff) | |
download | rtmux-e7f68a089eec93799c098c570c03047f84638a73.tar.gz rtmux-e7f68a089eec93799c098c570c03047f84638a73.tar.bz2 rtmux-e7f68a089eec93799c098c570c03047f84638a73.zip |
Write status across entire line.
-rw-r--r-- | TODO | 1 | ||||
-rw-r--r-- | screen-redraw.c | 7 | ||||
-rw-r--r-- | status.c | 4 |
3 files changed, 7 insertions, 5 deletions
@@ -64,6 +64,7 @@ - multiple paste buffers - window splitting? - if only one arg to switch-window, assume source-index +- test on wsvt25, vt100, vt220 -- For 0.2 -------------------------------------------------------------------- - anything which uses cmd_{send,recv}_string will break if the string is diff --git a/screen-redraw.c b/screen-redraw.c index 76d7c96f..6f8c1f20 100644 --- a/screen-redraw.c +++ b/screen-redraw.c @@ -1,4 +1,4 @@ -/* $Id: screen-redraw.c,v 1.1 2007-12-06 09:46:22 nicm Exp $ */ +/* $Id: screen-redraw.c,v 1.2 2008-01-03 19:18:14 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -138,7 +138,7 @@ screen_redraw_write_string(struct screen_redraw_ctx *ctx, const char *fmt, ...) va_end(ap); for (ptr = msg; *ptr != '\0'; ptr++) { - if (ctx->s->cx > screen_last_x(s)) + if (ctx->s->cx > screen_size_x(s)) break; if (*ptr < 0x20) continue; @@ -165,7 +165,8 @@ screen_redraw_clear_screen(struct screen_redraw_ctx *ctx) void screen_redraw_clear_end_of_line(struct screen_redraw_ctx *ctx) { - ctx->write(ctx->data, TTY_CLEARENDOFLINE); + if (ctx->s->cx < screen_last_x(ctx->s)) + ctx->write(ctx->data, TTY_CLEARENDOFLINE); } /* Redraw single cell. */ @@ -1,4 +1,4 @@ -/* $Id: status.c,v 1.15 2007-12-06 09:46:23 nicm Exp $ */ +/* $Id: status.c,v 1.16 2008-01-03 19:18:14 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -49,7 +49,7 @@ status_write_client(struct client *c) screen_redraw_write_string( &ctx, "%d:%s%c ", wl->idx, wl->window->name, flag); - if (ctx.s->cx >= screen_last_x(ctx.s)) + if (ctx.s->cx > screen_size_x(ctx.s)) break; } screen_redraw_clear_end_of_line(&ctx); |