diff options
author | Aaron Campbell <aaron@cvs.openbsd.org> | 2001-02-08 02:47:13 +0000 |
---|---|---|
committer | Aaron Campbell <aaron@cvs.openbsd.org> | 2001-02-08 02:47:13 +0000 |
commit | c693318dd78e5cc3dbae4ca18679b5860a526180 (patch) | |
tree | 84dbd979e0c8b3b13c56caa5b9d2d7cc18ceb2eb /sys/dev/wscons/wsdisplay.c | |
parent | 43b87b68212dadba31a6933a3dbcf8aa809ce28d (diff) |
Cause keypresses to reset the screen in case we are in scrollback (previously
the screen was only restored if a new character was actually displayed on the
screen); jcs@rt.fm. This brings us closer to the behavior of PCVT. Also, while
I'm here, add some #ifdef so wskbd does not depend on wsdisplay (pointed out
to me by fgsch@).
Diffstat (limited to 'sys/dev/wscons/wsdisplay.c')
-rw-r--r-- | sys/dev/wscons/wsdisplay.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/dev/wscons/wsdisplay.c b/sys/dev/wscons/wsdisplay.c index 8cf700dd3bf..cc09b6a34af 100644 --- a/sys/dev/wscons/wsdisplay.c +++ b/sys/dev/wscons/wsdisplay.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wsdisplay.c,v 1.9 2000/11/23 16:13:42 aaron Exp $ */ +/* $OpenBSD: wsdisplay.c,v 1.10 2001/02/08 02:47:11 aaron Exp $ */ /* $NetBSD: wsdisplay.c,v 1.37.4.1 2000/06/30 16:27:53 simonb Exp $ */ /* @@ -1811,9 +1811,13 @@ wsscrollback(arg, op) struct wsdisplay_softc *sc = arg; int lines; - lines = sc->sc_focus->scr_dconf->scrdata->nrows - 1; - if (op == WSCONS_SCROLL_BACKWARD) - lines = -lines; + if (op == WSDISPLAY_SCROLL_RESET) + lines = 0; + else { + lines = sc->sc_focus->scr_dconf->scrdata->nrows - 1; + if (op == WSDISPLAY_SCROLL_BACKWARD) + lines = -lines; + } if (sc->sc_accessops->scrollback) { (*sc->sc_accessops->scrollback)(sc->sc_accesscookie, |