diff options
author | 2000-02-27 20:34:36 +0000 | |
---|---|---|
committer | 2000-02-27 20:34:36 +0000 | |
commit | 6df42e254e0feef1a01e0b48b4af23fea5ee177f (patch) | |
tree | b2a6172e2160e3c0e83eeeba4a7995148a734415 | |
parent | - Set scr_offset to -1 at driver init, not 0. Fixes a subtle bug. (diff) | |
download | wireguard-openbsd-6df42e254e0feef1a01e0b48b4af23fea5ee177f.tar.xz wireguard-openbsd-6df42e254e0feef1a01e0b48b4af23fea5ee177f.zip |
Fix a minor off-by-one error.
-rw-r--r-- | sys/arch/i386/isa/pcvt/pcvt_kbd.c | 4 | ||||
-rw-r--r-- | sys/arch/i386/isa/pcvt/pcvt_sup.c | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/sys/arch/i386/isa/pcvt/pcvt_kbd.c b/sys/arch/i386/isa/pcvt/pcvt_kbd.c index bedc748f1c4..c0241b26901 100644 --- a/sys/arch/i386/isa/pcvt/pcvt_kbd.c +++ b/sys/arch/i386/isa/pcvt/pcvt_kbd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pcvt_kbd.c,v 1.32 2000/01/18 19:34:41 aaron Exp $ */ +/* $OpenBSD: pcvt_kbd.c,v 1.33 2000/02/27 20:34:36 aaron Exp $ */ /* * Copyright (c) 1992, 1995 Hellmuth Michaelis and Joerg Wunsch. @@ -1106,7 +1106,7 @@ regular: if ((key == 85) && shift_down && (kbd_lastkey != 85 || !kbd_status.breakseen)) { - if (vsp->scr_offset > vsp->row) { + if (vsp->scr_offset >= vsp->row) { if (!vsp->scrolling) { vsp->scrolling += vsp->row - 1; if (vsp->Scrollback) { diff --git a/sys/arch/i386/isa/pcvt/pcvt_sup.c b/sys/arch/i386/isa/pcvt/pcvt_sup.c index d5c69772177..de0a56364d7 100644 --- a/sys/arch/i386/isa/pcvt/pcvt_sup.c +++ b/sys/arch/i386/isa/pcvt/pcvt_sup.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pcvt_sup.c,v 1.15 2000/01/18 19:34:42 aaron Exp $ */ +/* $OpenBSD: pcvt_sup.c,v 1.16 2000/02/27 20:34:36 aaron Exp $ */ /* * Copyright (c) 1992, 1995 Hellmuth Michaelis and Joerg Wunsch. @@ -747,7 +747,8 @@ reallocate_scrollbuffer(struct video_state *svsp, int pages) } bcopy(svsp->Crtat, svsp->Scrollback, svsp->screen_rows * svsp->maxcol * CHR); - svsp->scr_offset = svsp->row; + + svsp->scr_offset = svsp->row - 1; } splx(s); } |