diff options
author | ed <ed@FreeBSD.org> | 2009-09-12 08:19:24 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2009-09-12 08:19:24 +0000 |
commit | a0b9f3abc074f1c338f59da8eb7b4bad3f3035da (patch) | |
tree | 292ea1d61ad1f731bccc1aae514fd1ed869fb880 /sys/teken/teken.c | |
parent | b3185d9a00b3c9cbd27ae705609e2666a8b05c2a (diff) | |
download | FreeBSD-src-a0b9f3abc074f1c338f59da8eb7b4bad3f3035da.zip FreeBSD-src-a0b9f3abc074f1c338f59da8eb7b4bad3f3035da.tar.gz |
Make resizing of teken terminals a bit more safe.
Just perform a full reset when resizing the terminal. This means the
cursor, scrolling region, etc. are never positioned outside the
terminal.
Diffstat (limited to 'sys/teken/teken.c')
-rw-r--r-- | sys/teken/teken.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/sys/teken/teken.c b/sys/teken/teken.c index 58f4f37..9ca81e6 100644 --- a/sys/teken/teken.c +++ b/sys/teken/teken.c @@ -341,10 +341,7 @@ teken_set_winsize(teken_t *t, const teken_pos_t *p) { t->t_winsize = *p; - /* XXX: bounds checking with cursor/etc! */ - t->t_scrollreg.ts_begin = 0; - t->t_scrollreg.ts_end = t->t_winsize.tp_row; - t->t_originreg = t->t_scrollreg; + teken_subr_do_reset(t); } /* |