From 13d1df659f464714af03221bfe2f1ef680dae3ae Mon Sep 17 00:00:00 2001 From: Tiago Cunha Date: Fri, 23 Oct 2009 17:03:48 +0000 Subject: [PATCH] Sync OpenBSD patchset 413: When checking whether the region will scroll and the cursor position is thus unsuitable for using CUD/CUU, check the current cursor position not the target position. --- tty.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tty.c b/tty.c index 00b8cd77..b68cda89 100644 --- a/tty.c +++ b/tty.c @@ -1,4 +1,4 @@ -/* $Id: tty.c,v 1.152 2009-10-15 01:44:15 tcunha Exp $ */ +/* $Id: tty.c,v 1.153 2009-10-23 17:03:48 tcunha Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -1062,14 +1062,14 @@ tty_cursor(struct tty *tty, u_int cx, u_int cy) */ /* One above. */ - if (cy != tty->rupper && + if (thisy != tty->rupper && cy == thisy - 1 && tty_term_has(term, TTYC_CUU1)) { tty_putcode(tty, TTYC_CUU1); goto out; } /* One below. */ - if (cy != tty->rlower && + if (thisy != tty->rlower && cy == thisy + 1 && tty_term_has(term, TTYC_CUD1)) { tty_putcode(tty, TTYC_CUD1); goto out;