Fix bug that caused SIGSEGV or SIGBUS to happen when the line at the
authorChris Hanson <org/chris-hanson/cph>
Mon, 8 Jul 1991 22:34:05 +0000 (22:34 +0000)
committerChris Hanson <org/chris-hanson/cph>
Mon, 8 Jul 1991 22:34:05 +0000 (22:34 +0000)
bottom of the window had a continuation line that extended past the
bottom.

v7/src/edwin/bufwfs.scm

index f6dee72b8aa23cbfaffdcada846130abba7ccfa8..7510559afe91a9c0e7267fcdfb94b3599cda7745 100644 (file)
@@ -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
 ;;;
       (%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)