From: Andreas Schwab Date: Mon, 3 Mar 2008 22:29:12 +0000 (+0000) Subject: (decode_coding_object): Inhibit gap shrinking while X-Git-Tag: emacs-pretest-23.0.90~7478 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f4a3cc44334f7b0a8a09723956f58771472ae9f6;p=emacs.git (decode_coding_object): Inhibit gap shrinking while decoding in place. --- diff --git a/src/ChangeLog b/src/ChangeLog index c7874612c6d..17d98ddbe87 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2008-03-03 Andreas Schwab + + * coding.c (decode_coding_object): Inhibit gap shrinking while + decoding in place. + 2008-03-03 Dan Nicolaescu * w32term.c: Remove unused include "gnu.h". diff --git a/src/coding.c b/src/coding.c index d021a173a78..e6f544c8f87 100644 --- a/src/coding.c +++ b/src/coding.c @@ -6925,6 +6925,7 @@ decode_coding_object (coding, src_object, from, from_byte, to, to_byte, } 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 @@ decode_coding_object (coding, src_object, from, from_byte, to, to_byte, 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)