summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAaron Campbell <aaron@cvs.openbsd.org>2000-06-11 18:57:36 +0000
committerAaron Campbell <aaron@cvs.openbsd.org>2000-06-11 18:57:36 +0000
commitf172cb38525edd1c6bdf1c41fe3a74ece42cbcd7 (patch)
treee5b8d32eb8371d6af8eb56d9aeb444ea84878439 /sys
parent0586b0de477f8da172e2a54e289f60d0ffcaa673 (diff)
Better fix for the scrolling region problem. Fixes PR/1271.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/i386/isa/pcvt/pcvt_out.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/arch/i386/isa/pcvt/pcvt_out.c b/sys/arch/i386/isa/pcvt/pcvt_out.c
index 4c7b10157d5..5d54bc5cd1d 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.22 2000/06/04 18:09:16 aaron Exp $ */
+/* $OpenBSD: pcvt_out.c,v 1.23 2000/06/11 18:57:35 aaron Exp $ */
/*
* Copyright (c) 1992, 1995 Hellmuth Michaelis and Joerg Wunsch.
@@ -1300,11 +1300,17 @@ vt_coldmalloc(void)
static void
check_scroll(struct video_state *svsp)
{
+ int region_size;
+
+ region_size = (svsp->scrr_end + 1) * svsp->maxcol;
+
if(!svsp->abs_write)
{
/* we write within scroll region */
- if(svsp->cur_offset == ((svsp->scrr_end + 1) * svsp->maxcol))
+ if((svsp->cur_offset == region_size) ||
+ (svsp->cur_offset > region_size && (svsp->scrr_end ==
+ svsp->screen_rows - 1)))
{
/* the following piece of code has to be protected */
/* from trying to switch to another virtual screen */