summaryrefslogtreecommitdiffstats
path: root/sys/teken/teken_subr.h
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2009-09-12 08:19:24 +0000
committered <ed@FreeBSD.org>2009-09-12 08:19:24 +0000
commita0b9f3abc074f1c338f59da8eb7b4bad3f3035da (patch)
tree292ea1d61ad1f731bccc1aae514fd1ed869fb880 /sys/teken/teken_subr.h
parentb3185d9a00b3c9cbd27ae705609e2666a8b05c2a (diff)
downloadFreeBSD-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_subr.h')
-rw-r--r--sys/teken/teken_subr.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/teken/teken_subr.h b/sys/teken/teken_subr.h
index 21982e2..38a29ee 100644
--- a/sys/teken/teken_subr.h
+++ b/sys/teken/teken_subr.h
@@ -927,6 +927,9 @@ teken_subr_do_reset(teken_t *t)
t->t_curattr = t->t_defattr;
t->t_cursor.tp_row = t->t_cursor.tp_col = 0;
+ t->t_scrollreg.ts_begin = 0;
+ t->t_scrollreg.ts_end = t->t_winsize.tp_row;
+ t->t_originreg = t->t_scrollreg;
t->t_stateflags = TS_AUTOWRAP;
teken_scs_set(t, 0, teken_scs_us_ascii);
OpenPOWER on IntegriCloud