aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-10-16 19:09:40 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-10-16 19:09:40 +0000
commit70355021d8e8b83eaa3d947dc7a49b4eacff17fa (patch)
tree278af8d4910ca2399ef5060f13b434e2734baf83
parentdba0d54cf537ebfd125aa17a20eb88ef266db9c1 (diff)
downloadrtmux-70355021d8e8b83eaa3d947dc7a49b4eacff17fa.tar.gz
rtmux-70355021d8e8b83eaa3d947dc7a49b4eacff17fa.tar.bz2
rtmux-70355021d8e8b83eaa3d947dc7a49b4eacff17fa.zip
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.
-rw-r--r--tty.c4
1 files 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;