From c693318dd78e5cc3dbae4ca18679b5860a526180 Mon Sep 17 00:00:00 2001 From: Aaron Campbell Date: Thu, 8 Feb 2001 02:47:13 +0000 Subject: 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@). --- sys/dev/ic/vga.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'sys/dev/ic') 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; -- cgit v1.2.3