diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-11-26 22:06:11 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-11-26 22:06:11 +0000 |
commit | 14610569c8477a65ff126f9c6e33cd88ad476ed4 (patch) | |
tree | cca26e05c9e843744c75221cf765500c045e264b /screen.c | |
parent | 6b2debfbfa825905b8d236453d61c4b0be751780 (diff) |
This is better than disabling it.
Diffstat (limited to 'screen.c')
-rw-r--r-- | screen.c | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -1,4 +1,4 @@ -/* $Id: screen.c,v 1.48 2007-11-26 20:45:13 nicm Exp $ */ +/* $Id: screen.c,v 1.49 2007-11-26 22:06:11 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -455,7 +455,19 @@ screen_draw_column(struct screen_draw_ctx *ctx, u_int px) void screen_draw_line(struct screen_draw_ctx *ctx, u_int py) { - screen_draw_cells(ctx, 0, py, screen_size_x(ctx->s)); + u_int cx, cy; + + cy = screen_y(ctx->s, py) - ctx->oy; + cx = ctx->s->grid_size[cy]; + + if (ctx->sel.flag || + screen_size_x(ctx->s) < 3 || cx >= screen_size_x(ctx->s) - 3) + screen_draw_cells(ctx, 0, py, screen_size_x(ctx->s)); + else { + screen_draw_cells(ctx, 0, py, cx); + screen_draw_move(ctx, cx, py); + input_store_zero(ctx->b, CODE_CLEARENDOFLINE); + } } /* Draw set of lines. */ |