From 40fe813f8cb88c89424104c6e544f1fd617bbbe1 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Tue, 2 May 1995 20:49:06 +0000 Subject: [PATCH] If a file insertion doesn't insert any data, don't do any of the post-processing that sets the modification bit, etc. --- v7/src/edwin/fileio.scm | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) 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))))) -- 2.25.1