diff options
author | 2017-05-12 13:00:56 +0000 | |
---|---|---|
committer | 2017-05-12 13:00:56 +0000 | |
commit | 6d5c64a026683c48d76dcdd3c69d77359fb3715e (patch) | |
tree | 181a7d4d7c050707cdae20bc6ddb148793441a1f /usr.bin/tmux/tty.c | |
parent | Regions can't be smaller than 2 so don't try to clear them by scrolling if so. (diff) | |
download | wireguard-openbsd-6d5c64a026683c48d76dcdd3c69d77359fb3715e.tar.xz wireguard-openbsd-6d5c64a026683c48d76dcdd3c69d77359fb3715e.zip |
Scrolling needs to use background colour.
Diffstat (limited to 'usr.bin/tmux/tty.c')
-rw-r--r-- | usr.bin/tmux/tty.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c index d2a79d7be07..a1570a0d008 100644 --- a/usr.bin/tmux/tty.c +++ b/usr.bin/tmux/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.277 2017/05/12 11:19:24 nicm Exp $ */ +/* $OpenBSD: tty.c,v 1.278 2017/05/12 13:00:56 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -1141,18 +1141,20 @@ tty_cmd_clearstartofline(struct tty *tty, const struct tty_ctx *ctx) void tty_cmd_reverseindex(struct tty *tty, const struct tty_ctx *ctx) { + struct window_pane *wp = ctx->wp; + if (ctx->ocy != ctx->orupper) return; if (!tty_pane_full_width(tty, ctx) || - tty_fake_bce(tty, ctx->wp, 8) || + tty_fake_bce(tty, wp, 8) || !tty_term_has(tty->term, TTYC_CSR) || !tty_term_has(tty->term, TTYC_RI)) { tty_redraw_region(tty, ctx); return; } - tty_attributes(tty, &grid_default_cell, ctx->wp); + tty_default_attributes(tty, wp, ctx->bg); tty_region_pane(tty, ctx, ctx->orupper, ctx->orlower); tty_margin_off(tty); @@ -1176,7 +1178,7 @@ tty_cmd_linefeed(struct tty *tty, const struct tty_ctx *ctx) return; } - tty_attributes(tty, &grid_default_cell, wp); + tty_default_attributes(tty, wp, ctx->bg); tty_region_pane(tty, ctx, ctx->orupper, ctx->orlower); tty_margin_pane(tty, ctx); @@ -1207,7 +1209,7 @@ tty_cmd_scrollup(struct tty *tty, const struct tty_ctx *ctx) return; } - tty_attributes(tty, &grid_default_cell, wp); + tty_default_attributes(tty, wp, ctx->bg); tty_region_pane(tty, ctx, ctx->orupper, ctx->orlower); tty_margin_pane(tty, ctx); |