summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2017-02-06 19:26:50 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2017-02-06 19:26:50 +0000
commitc68eea91363fc8c27d7dd96adf01082c3d0054b7 (patch)
tree53ffdfb09dd9d695395dea6f53d83625c6607556
parent09d9fc30826c7586ced3c93385a2792e66d555c3 (diff)
Add BCE for clear to start of screen, which was somehow missed.
-rw-r--r--usr.bin/tmux/input.c4
-rw-r--r--usr.bin/tmux/screen-write.c11
-rw-r--r--usr.bin/tmux/tmux.h4
-rw-r--r--usr.bin/tmux/tty.c4
4 files changed, 12 insertions, 11 deletions
diff --git a/usr.bin/tmux/input.c b/usr.bin/tmux/input.c
index 6002bfcfa72..b6558af0bca 100644
--- a/usr.bin/tmux/input.c
+++ b/usr.bin/tmux/input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: input.c,v 1.110 2017/02/06 13:25:15 nicm Exp $ */
+/* $OpenBSD: input.c,v 1.111 2017/02/06 19:26:49 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -1330,7 +1330,7 @@ input_csi_dispatch(struct input_ctx *ictx)
screen_write_clearendofscreen(sctx, ictx->cell.cell.bg);
break;
case 1:
- screen_write_clearstartofscreen(sctx);
+ screen_write_clearstartofscreen(sctx, ictx->cell.cell.bg);
break;
case 2:
screen_write_clearscreen(sctx, ictx->cell.cell.bg);
diff --git a/usr.bin/tmux/screen-write.c b/usr.bin/tmux/screen-write.c
index 8e73ffb390f..5d20b0c48cf 100644
--- a/usr.bin/tmux/screen-write.c
+++ b/usr.bin/tmux/screen-write.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: screen-write.c,v 1.104 2017/02/06 13:23:00 nicm Exp $ */
+/* $OpenBSD: screen-write.c,v 1.105 2017/02/06 19:26:49 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -971,24 +971,25 @@ screen_write_clearendofscreen(struct screen_write_ctx *ctx, u_int bg)
/* Clear to start of screen. */
void
-screen_write_clearstartofscreen(struct screen_write_ctx *ctx)
+screen_write_clearstartofscreen(struct screen_write_ctx *ctx, u_int bg)
{
struct screen *s = ctx->s;
struct tty_ctx ttyctx;
u_int sx = screen_size_x(s);
screen_write_initctx(ctx, &ttyctx);
+ ttyctx.bg = bg;
if (s->cy > 0) {
screen_dirty_clear(s, 0, 0, sx - 1, s->cy);
- grid_view_clear(s->grid, 0, 0, sx, s->cy, 8);
+ grid_view_clear(s->grid, 0, 0, sx, s->cy, bg);
}
if (s->cx > sx - 1) {
screen_dirty_clear(s, 0, s->cy, sx - 1, s->cy);
- grid_view_clear(s->grid, 0, s->cy, sx, 1, 8);
+ grid_view_clear(s->grid, 0, s->cy, sx, 1, bg);
} else {
screen_dirty_clear(s, 0, s->cy, s->cx, s->cy);
- grid_view_clear(s->grid, 0, s->cy, s->cx + 1, 1, 8);
+ grid_view_clear(s->grid, 0, s->cy, s->cx + 1, 1, bg);
}
tty_write(tty_cmd_clearstartofscreen, &ttyctx);
diff --git a/usr.bin/tmux/tmux.h b/usr.bin/tmux/tmux.h
index dfbafbb01a4..038dfa568d8 100644
--- a/usr.bin/tmux/tmux.h
+++ b/usr.bin/tmux/tmux.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: tmux.h,v 1.714 2017/02/06 15:00:41 nicm Exp $ */
+/* $OpenBSD: tmux.h,v 1.715 2017/02/06 19:26:49 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -1992,7 +1992,7 @@ void screen_write_scrollregion(struct screen_write_ctx *, u_int, u_int);
void screen_write_linefeed(struct screen_write_ctx *, int);
void screen_write_carriagereturn(struct screen_write_ctx *);
void screen_write_clearendofscreen(struct screen_write_ctx *, u_int);
-void screen_write_clearstartofscreen(struct screen_write_ctx *);
+void screen_write_clearstartofscreen(struct screen_write_ctx *, u_int);
void screen_write_clearscreen(struct screen_write_ctx *, u_int);
void screen_write_clearhistory(struct screen_write_ctx *);
void screen_write_cell(struct screen_write_ctx *, const struct grid_cell *);
diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c
index cc609b1d16a..32dc1244078 100644
--- a/usr.bin/tmux/tty.c
+++ b/usr.bin/tmux/tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.c,v 1.226 2017/02/06 13:23:00 nicm Exp $ */
+/* $OpenBSD: tty.c,v 1.227 2017/02/06 19:26:49 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -1057,7 +1057,7 @@ tty_cmd_clearstartofscreen(struct tty *tty, const struct tty_ctx *ctx)
struct screen *s = wp->screen;
u_int i, j;
- tty_attributes(tty, &grid_default_cell, wp);
+ tty_default_attributes(tty, wp, ctx->bg);
tty_region_pane(tty, ctx, 0, screen_size_y(s) - 1);
tty_margin_off(tty);