diff src/insdel.c @ 102185:d6a2f8a116ac

(del_range_2): Don't modify gap contents when called from decode_coding_object. (Bug#1809)
author Andreas Schwab <schwab@suse.de>
date Sun, 22 Feb 2009 14:29:25 +0000
parents e038c1a8307c
children b6116169967f
line wrap: on
line diff
--- a/src/insdel.c	Sun Feb 22 00:42:56 2009 +0000
+++ b/src/insdel.c	Sun Feb 22 14:29:25 2009 +0000
@@ -2006,7 +2006,10 @@
   Z -= nchars_del;
   GPT = from;
   GPT_BYTE = from_byte;
-  if (GAP_SIZE > 0) *(GPT_ADDR) = 0; /* Put an anchor.  */
+  if (GAP_SIZE > 0 && !current_buffer->text->inhibit_shrinking)
+    /* Put an anchor, unless called from decode_coding_object which
+       needs to access the previous gap contents.  */
+    *(GPT_ADDR) = 0;
 
   if (GPT_BYTE < GPT)
     abort ();