diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2009-10-16 19:09:41 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2009-10-16 19:09:41 +0000 |
commit | 82ef850f99092b1525898e58d876917eead56d37 (patch) | |
tree | 4be5bea544800ad1be6ddb55cd628b30727c36c4 | |
parent | eca3ac27f95703deb9a83d857252279906a2c3c8 (diff) |
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-- | usr.bin/tmux/tty.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c index 659538a3adc..1edeb375564 100644 --- a/usr.bin/tmux/tty.c +++ b/usr.bin/tmux/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.48 2009/10/13 08:37:15 nicm Exp $ */ +/* $OpenBSD: tty.c,v 1.49 2009/10/16 19:09:40 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -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; |