diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2008-06-14 16:47:20 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2008-06-14 16:47:20 +0000 |
commit | 0f403474aaf0f4aa4475ef6095d1ab420ebfed60 (patch) | |
tree | 2a51f3a931cfa23f39b2f737dd682ddc0e03611a /screen-redraw.c | |
parent | 62d7ad2690c0f72f06195351aa50e3fe037f456a (diff) | |
download | rtmux-0f403474aaf0f4aa4475ef6095d1ab420ebfed60.tar.gz rtmux-0f403474aaf0f4aa4475ef6095d1ab420ebfed60.tar.bz2 rtmux-0f403474aaf0f4aa4475ef6095d1ab420ebfed60.zip |
New window options: force-width and force-height. This will force a window to
an arbitrary width and height (0 for the default unlimited). This is neat for
emacs which doesn't have a sensible way to force hard wrapping at 80
columns. Also, don't try to be clever and use clr_eol when redrawing the
whole screen, it causes trouble since the redraw functions are used to draw
the blank areas too.
Diffstat (limited to 'screen-redraw.c')
-rw-r--r-- | screen-redraw.c | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/screen-redraw.c b/screen-redraw.c index 6d6f328e..2c44b13d 100644 --- a/screen-redraw.c +++ b/screen-redraw.c @@ -1,4 +1,4 @@ -/* $Id: screen-redraw.c,v 1.5 2008-06-14 12:05:06 nicm Exp $ */ +/* $Id: screen-redraw.c,v 1.6 2008-06-14 16:47:20 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -181,19 +181,12 @@ screen_redraw_area( void screen_redraw_lines(struct screen_redraw_ctx *ctx, u_int py, u_int ny) { - u_int i, cx, sx; + screen_redraw_area(ctx, 0, py, screen_size_x(ctx->s), py + ny); +} - sx = screen_size_x(ctx->s); - for (i = py; i < py + ny; i++) { - cx = ctx->s->grid_size[screen_y(ctx->s, i)]; - if (ctx->s->sel.flag || sx < 5 || cx >= sx - 5) { - screen_redraw_area(ctx, 0, i, screen_size_x(ctx->s), 1); - continue; - } - screen_redraw_area(ctx, 0, i, cx, 1); - screen_redraw_move_cursor(ctx, cx, i); - screen_redraw_set_attributes( - ctx, SCREEN_DEFATTR, SCREEN_DEFCOLR); - ctx->write(ctx->data, TTY_CLEARENDOFLINE); - } +/* Draw set of columns. */ +void +screen_redraw_columns(struct screen_redraw_ctx *ctx, u_int px, u_int nx) +{ + screen_redraw_area(ctx, px, 0, px + nx, screen_size_y(ctx->s)); } |