From 70355021d8e8b83eaa3d947dc7a49b4eacff17fa Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Fri, 16 Oct 2009 19:09:40 +0000 Subject: [PATCH] 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tty.c b/tty.c index 5bf9b6d3..53cd3362 100644 --- a/tty.c +++ b/tty.c @@ -1057,14 +1057,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;