summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
authorAaron Campbell <aaron@cvs.openbsd.org>2000-02-27 19:31:06 +0000
committerAaron Campbell <aaron@cvs.openbsd.org>2000-02-27 19:31:06 +0000
commite75ca0fed17ee9f87ef032c7bc57ed1a0a2eb876 (patch)
tree86d8f7f0ff05983c97c904be7920896076071285 /sys/arch/i386
parent420ce8bf170eaff4099ea17f0146b3fbddcc8818 (diff)
- Set scr_offset to -1 at driver init, not 0. Fixes a subtle bug.
- Do not decrement scr_offset on vt_clreol().
Diffstat (limited to 'sys/arch/i386')
-rw-r--r--sys/arch/i386/isa/pcvt/pcvt_hdr.h4
-rw-r--r--sys/arch/i386/isa/pcvt/pcvt_out.c7
2 files changed, 4 insertions, 7 deletions
diff --git a/sys/arch/i386/isa/pcvt/pcvt_hdr.h b/sys/arch/i386/isa/pcvt/pcvt_hdr.h
index 82695152a7d..30aca0a3842 100644
--- a/sys/arch/i386/isa/pcvt/pcvt_hdr.h
+++ b/sys/arch/i386/isa/pcvt/pcvt_hdr.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcvt_hdr.h,v 1.32 2000/01/17 02:47:36 aaron Exp $ */
+/* $OpenBSD: pcvt_hdr.h,v 1.33 2000/02/27 19:31:05 aaron Exp $ */
/*
* Copyright (c) 1992, 1995 Hellmuth Michaelis and Joerg Wunsch.
@@ -601,7 +601,7 @@ typedef struct video_state {
u_short *Crtat; /* video page start addr */
u_short *Memory; /* malloc'ed memory start address */
u_short *Scrollback; /* scrollback buffer */
- u_short scr_offset; /* current scrollback offset (lines) */
+ int scr_offset; /* current scrollback offset (lines) */
short scrolling; /* current scrollback page */
u_short max_off; /* maximum scrollback offset */
struct tty *vs_tty; /* pointer to this screen's tty */
diff --git a/sys/arch/i386/isa/pcvt/pcvt_out.c b/sys/arch/i386/isa/pcvt/pcvt_out.c
index 052bd21211d..dc432efef1a 100644
--- a/sys/arch/i386/isa/pcvt/pcvt_out.c
+++ b/sys/arch/i386/isa/pcvt/pcvt_out.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcvt_out.c,v 1.17 2000/01/17 02:46:23 aaron Exp $ */
+/* $OpenBSD: pcvt_out.c,v 1.18 2000/02/27 19:31:05 aaron Exp $ */
/*
* Copyright (c) 1992, 1995 Hellmuth Michaelis and Joerg Wunsch.
@@ -806,9 +806,6 @@ sput (u_char *s, U_char kernel, int len, int page)
case 'K': /* erase line */
vt_clreol(svsp);
svsp->state = STATE_INIT;
- if (svsp->scr_offset > 0 &&
- svsp == vsp)
- svsp->scr_offset--;
break;
case 'L': /* insert line */
@@ -1098,7 +1095,7 @@ vt_coldinit(void)
svsp->Crtat = Crtat; /* all same until malloc'ed */
svsp->Memory = Crtat; /* until malloc'ed */
svsp->Scrollback = 0; /* until malloc'ed */
- svsp->scr_offset = 0; /* scrollback offset (lines) */
+ svsp->scr_offset = -1; /* scrollback offset (lines) */
svsp->scrolling = 0; /* current scrollback page */
svsp->cur_offset = 0; /* cursor offset */
svsp->c_attr = user_attr; /* non-kernel attributes */