From: Chris Hanson Date: Tue, 2 May 1995 20:49:06 +0000 (+0000) Subject: If a file insertion doesn't insert any data, don't do any of the X-Git-Tag: 20090517-FFI~6359 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=40fe813f8cb88c89424104c6e544f1fd617bbbe1;p=mit-scheme.git If a file insertion doesn't insert any data, don't do any of the post-processing that sets the modification bit, etc. --- diff --git a/v7/src/edwin/fileio.scm b/v7/src/edwin/fileio.scm index cd7201856..694d977cc 100644 --- a/v7/src/edwin/fileio.scm +++ b/v7/src/edwin/fileio.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: fileio.scm,v 1.126 1995/04/30 07:12:12 cph Exp $ +;;; $Id: fileio.scm,v 1.127 1995/05/02 20:49:06 cph Exp $ ;;; ;;; Copyright (c) 1986, 1989-95 Massachusetts Institute of Technology ;;; @@ -155,11 +155,12 @@ Each procedure is called with three arguments: (if buffer (input-buffer/read-substring buffer text index end) (channel-read-block channel text index end))))) - (without-interrupts - (lambda () - (let ((gap-start* (fix:+ index n))) - (undo-record-insertion! group index gap-start*) - (finish-group-insert! group index n)))) + (if (fix:> n 0) + (without-interrupts + (lambda () + (let ((gap-start* (fix:+ index n))) + (undo-record-insertion! group index gap-start*) + (finish-group-insert! group index n))))) (channel-close channel) n)))))