mirror of
https://github.com/tmux/tmux.git
synced 2024-11-05 02:18:47 +00:00
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.
This commit is contained in:
parent
4afecbe400
commit
13d1df659f
6
tty.c
6
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 <nicm@users.sourceforge.net>
|
||||
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user