aboutsummaryrefslogtreecommitdiff
path: root/sys/teken/teken_subr.h
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2010-08-09 18:07:15 +0000
committerEd Schouten <ed@FreeBSD.org>2010-08-09 18:07:15 +0000
commit0abe3145c39427f0edaa556c9c4bb6cc575d0be7 (patch)
treedfd3f6979911a1a943f933ebf000bab589ede5d8 /sys/teken/teken_subr.h
parentb41f3f4cdeafb6dc431de50cba17169a83307c8d (diff)
downloadsrc-0abe3145c39427f0edaa556c9c4bb6cc575d0be7.tar.gz
src-0abe3145c39427f0edaa556c9c4bb6cc575d0be7.zip
Make ^L with cons25 and origin mode bit more sane.
Even though cons25 normally doesn't support origin regions, this emulator does allow you to do it. It makes more sense to blank only the origin region when emitting ^L instead of blanking the entire screen. Apart from that, we should always place the cursor inside the origin region, which doesn't happen right now.
Notes
Notes: svn path=/head/; revision=211113
Diffstat (limited to 'sys/teken/teken_subr.h')
-rw-r--r--sys/teken/teken_subr.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/teken/teken_subr.h b/sys/teken/teken_subr.h
index 6bad71e36567..c84679a36604 100644
--- a/sys/teken/teken_subr.h
+++ b/sys/teken/teken_subr.h
@@ -725,11 +725,17 @@ teken_subr_newpage(teken_t *t)
if (t->t_stateflags & TS_CONS25) {
teken_rect_t tr;
- tr.tr_begin.tp_row = tr.tr_begin.tp_col = 0;
- tr.tr_end = t->t_winsize;
+ /* Clear screen. */
+ tr.tr_begin.tp_row = t->t_originreg.ts_begin;
+ tr.tr_begin.tp_col = 0;
+ tr.tr_end.tp_row = t->t_originreg.ts_end;
+ tr.tr_end.tp_col = t->t_winsize.tp_col;
teken_funcs_fill(t, &tr, BLANK, &t->t_curattr);
- t->t_cursor.tp_row = t->t_cursor.tp_col = 0;
+ /* Cursor at top left. */
+ t->t_cursor.tp_row = t->t_originreg.ts_begin;
+ t->t_cursor.tp_col = 0;
+ t->t_stateflags &= ~TS_WRAPPED;
teken_funcs_cursor(t);
} else {
teken_subr_newline(t);