summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
authorAaron Campbell <aaron@cvs.openbsd.org>2000-10-16 03:38:29 +0000
committerAaron Campbell <aaron@cvs.openbsd.org>2000-10-16 03:38:29 +0000
commitbbdb3e3b128bb4ebedd0ce5ae3045e48f4701baa (patch)
tree1dc152e99ac6ba9c5fe21b798e33d30786434eba /sys/arch/i386
parent1575ec698fbce11feee8820741fbe89d4c0034e6 (diff)
Make doubly sure we scroll up if we've passed the last row on the screen.
Diffstat (limited to 'sys/arch/i386')
-rw-r--r--sys/arch/i386/isa/pcvt/pcvt_out.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/arch/i386/isa/pcvt/pcvt_out.c b/sys/arch/i386/isa/pcvt/pcvt_out.c
index bb1bc2e47d5..e982b70dbf9 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.28 2000/10/16 02:34:41 aaron Exp $ */
+/* $OpenBSD: pcvt_out.c,v 1.29 2000/10/16 03:38:28 aaron Exp $ */
/*
* Copyright (c) 1992, 1995 Hellmuth Michaelis and Joerg Wunsch.
@@ -217,7 +217,6 @@ sput (u_char *s, U_char kernel, int len, int page)
svsp->cur_offset -= svsp->col;
svsp->col = 0;
}
- svsp->row = svsp->cur_offset / svsp->maxcol;
svsp->cur_offset += svsp->maxcol;
check_scroll(svsp);
break;
@@ -355,7 +354,6 @@ sput (u_char *s, U_char kernel, int len, int page)
if (svsp->lastchar && svsp->m_awm &&
(svsp->lastrow == svsp->row))
{
- svsp->row = svsp->cur_offset / svsp->maxcol;
svsp->cur_offset++;
svsp->col = 0;
svsp->lastchar = 0;
@@ -1316,7 +1314,8 @@ check_scroll(struct video_state *svsp)
{
/* we write within scroll region */
- if(svsp->row == svsp->scrr_end)
+ if (svsp->row == svsp->scrr_end || (svsp->cur_offset >=
+ svsp->screen_rows * svsp->maxcol))
{
/* the following piece of code has to be protected */
/* from trying to switch to another virtual screen */