Fix fencepost error that sometimes caused extra newline to be inserted
authorChris Hanson <org/chris-hanson/cph>
Thu, 3 Oct 1991 20:48:44 +0000 (20:48 +0000)
committerChris Hanson <org/chris-hanson/cph>
Thu, 3 Oct 1991 20:48:44 +0000 (20:48 +0000)
at end of paragraph being filled.

v7/src/edwin/fill.scm

index 46aa50f0aa8f4ced4fd2073999af5fe14f0b0d61..bb271be7c0a2ceab7b17487b1605e8ce81a690fa 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;;    $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/fill.scm,v 1.50 1991/05/02 01:13:16 cph Exp $
+;;;    $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/fill.scm,v 1.51 1991/10/03 20:48:44 cph Exp $
 ;;;
 ;;;    Copyright (c) 1986, 1989-91 Massachusetts Institute of Technology
 ;;;
@@ -205,7 +205,7 @@ Prefix arg means justify as well."
                (if (mark< point end)
                    (begin
                      (delete-horizontal-space point)
-                     (insert-newline point)
+                     (if (mark< point end) (insert-newline point))
                      (if justify?
                          (fill:call-with-line-marks (mark-1+ point)
                                                     fill-prefix