diff options
author | ed <ed@FreeBSD.org> | 2011-10-10 06:13:27 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2011-10-10 06:13:27 +0000 |
commit | 9de53f6dc0c192bb58cabb93558ce6e89af3d196 (patch) | |
tree | 999c7ca4f55c381df63b951e955cd9f228e6cae9 /sys/teken | |
parent | 359f981f4a1c1204772b1f62f06e4b066da2ea08 (diff) | |
download | FreeBSD-src-9de53f6dc0c192bb58cabb93558ce6e89af3d196.zip FreeBSD-src-9de53f6dc0c192bb58cabb93558ce6e89af3d196.tar.gz |
Properly use the cursor to bound the position for CUP.
We must take the origin region into account when clamping the cursor
position.
MFC after: 3 days
Diffstat (limited to 'sys/teken')
-rw-r--r-- | sys/teken/teken_subr.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/teken/teken_subr.h b/sys/teken/teken_subr.h index af70a00..64f4e54 100644 --- a/sys/teken/teken_subr.h +++ b/sys/teken/teken_subr.h @@ -325,7 +325,7 @@ teken_subr_cursor_position(teken_t *t, unsigned int row, unsigned int col) { t->t_cursor.tp_row = t->t_originreg.ts_begin + row - 1; - if (row >= t->t_originreg.ts_end) + if (t->t_cursor.tp_row >= t->t_originreg.ts_end) t->t_cursor.tp_row = t->t_originreg.ts_end - 1; t->t_cursor.tp_col = col - 1; |