From cb36f44f92411a65728848159782878a9fe5f61b Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Sat, 10 Oct 2009 10:36:47 +0000 Subject: There is no point setting the scroll region up for line feeds unless scrolling is actually going to happen, so don't. --- usr.bin/tmux/tty.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'usr.bin/tmux/tty.c') diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c index b3deaa38dc9..c4adaa9ece7 100644 --- a/usr.bin/tmux/tty.c +++ b/usr.bin/tmux/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.36 2009/10/09 07:33:12 nicm Exp $ */ +/* $OpenBSD: tty.c,v 1.37 2009/10/10 10:36:46 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -693,11 +693,10 @@ tty_cmd_linefeed(struct tty *tty, const struct tty_ctx *ctx) return; } - tty_reset(tty); - - tty_region(tty, ctx->orupper, ctx->orlower, wp->yoff); if (ctx->ocy == ctx->orlower) { + tty_reset(tty); + tty_region(tty, ctx->orupper, ctx->orlower, wp->yoff); tty_cursor(tty, ctx->ocx, ctx->ocy, wp->xoff, wp->yoff); tty_putc(tty, '\n'); } -- cgit v1.2.3