changeset 92458:5f5f07a5c076

(decode_coding_object): Inhibit gap shrinking while decoding in place.
author Andreas Schwab <schwab@suse.de>
date Mon, 03 Mar 2008 22:29:12 +0000
parents 4889233e5713
children edefaec61bcf
files src/ChangeLog src/coding.c
diffstat 2 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Mon Mar 03 22:20:13 2008 +0000
+++ b/src/ChangeLog	Mon Mar 03 22:29:12 2008 +0000
@@ -1,3 +1,8 @@
+2008-03-03  Andreas Schwab  <schwab@suse.de>
+
+	* coding.c (decode_coding_object): Inhibit gap shrinking while
+	decoding in place.
+
 2008-03-03  Dan Nicolaescu  <dann@ics.uci.edu>
 
 	* w32term.c: Remove unused include "gnu.h".
--- a/src/coding.c	Mon Mar 03 22:20:13 2008 +0000
+++ b/src/coding.c	Mon Mar 03 22:29:12 2008 +0000
@@ -6925,6 +6925,7 @@
 	    }
 	  saved_pt = PT, saved_pt_byte = PT_BYTE;
 	  TEMP_SET_PT_BOTH (from, from_byte);
+	  current_buffer->text->inhibit_shrinking = 1;
 	  del_range_both (from, from_byte, to, to_byte, 1);
 	  coding->src_pos = -chars;
 	  coding->src_pos_byte = -bytes;
@@ -7018,6 +7019,7 @@
 	 As we have moved PT while replacing the original buffer
 	 contents, we must recover it now.  */
       set_buffer_internal (XBUFFER (src_object));
+      current_buffer->text->inhibit_shrinking = 0;
       if (saved_pt < from)
 	TEMP_SET_PT_BOTH (saved_pt, saved_pt_byte);
       else if (saved_pt < from + chars)