From: Chris Hanson Date: Mon, 8 Jul 1991 22:34:05 +0000 (+0000) Subject: Fix bug that caused SIGSEGV or SIGBUS to happen when the line at the X-Git-Tag: 20090517-FFI~10478 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=3471b15841097dda385d8f1ef59f348404495549;p=mit-scheme.git Fix bug that caused SIGSEGV or SIGBUS to happen when the line at the bottom of the window had a continuation line that extended past the bottom. --- diff --git a/v7/src/edwin/bufwfs.scm b/v7/src/edwin/bufwfs.scm index f6dee72b8..7510559af 100644 --- a/v7/src/edwin/bufwfs.scm +++ b/v7/src/edwin/bufwfs.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/bufwfs.scm,v 1.14 1991/04/03 03:59:52 cph Exp $ +;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/bufwfs.scm,v 1.15 1991/07/08 22:34:05 cph Exp $ ;;; ;;; Copyright (c) 1986, 1989-91 Massachusetts Institute of Technology ;;; @@ -266,9 +266,12 @@ (%scroll-lines-up window start end new-start-y) (let ((start-outline (o3-outline start)) (amount (fix:- (o3-y start) new-start-y))) - (if (or (fix:<= (fix:- (o3-y end) amount) 0) - (and (fix:> (o3-y end) (window-y-size window)) - (eq? start-outline (o3-outline end)))) + (if (if (fix:> (o3-y end) (window-y-size window)) + (let ((outline (o3-outline end))) + (or (eq? start-outline outline) + (fix:<= (fix:- (o3-y end) (outline-y-size outline)) + amount))) + (fix:<= (o3-y end) amount)) (begin (deallocate-outlines! window start-outline (o3-outline end)) (deallocate-o3! window start)