From f4a3cc44334f7b0a8a09723956f58771472ae9f6 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 3 Mar 2008 22:29:12 +0000 Subject: [PATCH] (decode_coding_object): Inhibit gap shrinking while decoding in place. --- src/ChangeLog | 5 +++++ src/coding.c | 2 ++ 2 files changed, 7 insertions(+) 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) -- 2.39.5