diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2017-05-15 07:54:45 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2017-05-15 07:54:45 +0000 |
commit | f7e468f85d3f948c0210e978aa6bc9fa5ee93a53 (patch) | |
tree | 838f86865e94b7889061e239b732caa50e6924ae /usr.bin/tmux | |
parent | 2e1b39b17514e27a8705591b4365bbd4f93df36e (diff) |
The Konsole SU bug means it can't clear the entire scroll region (it
ignores if >= size, not if > as I first thought). So we can't
effectively fix it in code - remove the workarounds which just cause
bugs on other terminals.
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r-- | usr.bin/tmux/tmux.1 | 4 | ||||
-rw-r--r-- | usr.bin/tmux/tmux.h | 2 | ||||
-rw-r--r-- | usr.bin/tmux/tty.c | 23 |
3 files changed, 10 insertions, 19 deletions
diff --git a/usr.bin/tmux/tmux.1 b/usr.bin/tmux/tmux.1 index 74259f86e02..31c755461da 100644 --- a/usr.bin/tmux/tmux.1 +++ b/usr.bin/tmux/tmux.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: tmux.1,v 1.550 2017/05/10 13:05:41 nicm Exp $ +.\" $OpenBSD: tmux.1,v 1.551 2017/05/15 07:54:44 nicm Exp $ .\" .\" Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> .\" @@ -14,7 +14,7 @@ .\" IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING .\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: May 10 2017 $ +.Dd $Mdocdate: May 15 2017 $ .Dt TMUX 1 .Os .Sh NAME diff --git a/usr.bin/tmux/tmux.h b/usr.bin/tmux/tmux.h index 3da4ccefc18..07949f0a460 100644 --- a/usr.bin/tmux/tmux.h +++ b/usr.bin/tmux/tmux.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tmux.h,v 1.767 2017/05/12 13:00:56 nicm Exp $ */ +/* $OpenBSD: tmux.h,v 1.768 2017/05/15 07:54:44 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c index 50be92b0324..9bd83afbe22 100644 --- a/usr.bin/tmux/tty.c +++ b/usr.bin/tmux/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.283 2017/05/13 07:41:59 nicm Exp $ */ +/* $OpenBSD: tty.c,v 1.284 2017/05/15 07:54:44 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -838,7 +838,7 @@ tty_clear_area(struct tty *tty, const struct window_pane *wp, u_int py, tty_term_has(tty->term, TTYC_INDN)) { tty_region(tty, py, py + ny - 1); tty_margin_off(tty); - tty_putcode1(tty, TTYC_INDN, ny - 1); + tty_putcode1(tty, TTYC_INDN, ny); return; } @@ -853,7 +853,7 @@ tty_clear_area(struct tty *tty, const struct window_pane *wp, u_int py, tty_term_has(tty->term, TTYC_INDN)) { tty_region(tty, py, py + ny - 1); tty_margin(tty, px, px + nx - 1); - tty_putcode1(tty, TTYC_INDN, ny - 1); + tty_putcode1(tty, TTYC_INDN, ny); return; } } @@ -1214,7 +1214,7 @@ void tty_cmd_scrollup(struct tty *tty, const struct tty_ctx *ctx) { struct window_pane *wp = ctx->wp; - u_int i, lines; + u_int i; if ((!tty_pane_full_width(tty, ctx) && !tty_use_margin(tty)) || tty_fake_bce(tty, wp, 8) || @@ -1228,21 +1228,12 @@ tty_cmd_scrollup(struct tty *tty, const struct tty_ctx *ctx) tty_region_pane(tty, ctx, ctx->orupper, ctx->orlower); tty_margin_pane(tty, ctx); - /* - * Konsole has a bug where it will ignore SU if the parameter is more - * than the height of the scroll region. Clamping the parameter doesn't - * hurt in any case. - */ - lines = tty->rlower - tty->rupper; - if (lines > ctx->num) - lines = ctx->num; - - if (lines == 1 || !tty_term_has(tty->term, TTYC_INDN)) { + if (ctx->num == 1 || !tty_term_has(tty->term, TTYC_INDN)) { tty_cursor(tty, tty->rright, tty->rlower); - for (i = 0; i < lines; i++) + for (i = 0; i < ctx->num; i++) tty_putc(tty, '\n'); } else - tty_putcode1(tty, TTYC_INDN, lines); + tty_putcode1(tty, TTYC_INDN, ctx->num); } void |