mirror of
https://github.com/tmux/tmux.git
synced 2025-09-04 06:56:58 +00:00
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.
This commit is contained in:
@ -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;
|
||||
|
||||
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);
|
||||
}
|
||||
screen_redraw_area(ctx, 0, py, screen_size_x(ctx->s), py + ny);
|
||||
}
|
||||
|
||||
/* 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));
|
||||
}
|
||||
|
Reference in New Issue
Block a user