summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authorAaron Campbell <aaron@cvs.openbsd.org>2001-02-08 02:47:13 +0000
committerAaron Campbell <aaron@cvs.openbsd.org>2001-02-08 02:47:13 +0000
commitc693318dd78e5cc3dbae4ca18679b5860a526180 (patch)
tree84dbd979e0c8b3b13c56caa5b9d2d7cc18ceb2eb /sys/dev/ic
parent43b87b68212dadba31a6933a3dbcf8aa809ce28d (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/ic')
-rw-r--r--sys/dev/ic/vga.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/ic/vga.c b/sys/dev/ic/vga.c
index c2d59fb6e47..b0eb9df1092 100644
--- a/sys/dev/ic/vga.c
+++ b/sys/dev/ic/vga.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vga.c,v 1.16 2001/01/31 16:38:00 aaron Exp $ */
+/* $OpenBSD: vga.c,v 1.17 2001/02/08 02:47:10 aaron Exp $ */
/* $NetBSD: vga.c,v 1.28.2.1 2000/06/30 16:27:47 simonb Exp $ */
/*
@@ -913,8 +913,12 @@ vga_scrollback(v, cookie, lines)
struct vgascreen *scr = cookie;
struct vga_handle *vh = &vc->hdl;
- if (lines == 0)
+ if (lines == 0) {
+ if (scr->pcs.visibleoffset == scr->pcs.dispoffset)
+ return;
+
scr->pcs.visibleoffset = scr->pcs.dispoffset; /* reset */
+ }
else {
int vga_scr_end;
int margin = scr->pcs.type->ncols * 2;