From: Eli Zaretskii Date: Sun, 9 Nov 2014 16:40:43 +0000 (+0200) Subject: Fix bug #18982 with assertion violations when reverting buffers. X-Git-Tag: emacs-24.4.90~241 X-Git-Url: https://code.delx.au/gnu-emacs/commitdiff_plain/ea75a0e069998158b47b774aae263529568f8b1c Fix bug #18982 with assertion violations when reverting buffers. src/fileio.c (Finsert_file_contents): Invalidate buffer caches also when the inserted text does not need decoding. --- diff --git a/src/ChangeLog b/src/ChangeLog index c03218c21f..719ccec467 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2014-11-09 Eli Zaretskii + * fileio.c (Finsert_file_contents): Invalidate buffer caches also + when the inserted text does not need decoding. (Bug#18982) + * w32heap.c (allocate_heap): Set the lower limit of heap at 8MB. (Bug#18995) diff --git a/src/fileio.c b/src/fileio.c index fba64010b5..8570a1604a 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -4308,8 +4308,11 @@ by calling `format-decode', which see. */) coding_system = CODING_ID_NAME (coding.id); } else if (inserted > 0) - adjust_after_insert (PT, PT_BYTE, PT + inserted, PT_BYTE + inserted, - inserted); + { + invalidate_buffer_caches (current_buffer, PT, PT + inserted); + adjust_after_insert (PT, PT_BYTE, PT + inserted, PT_BYTE + inserted, + inserted); + } /* Call after-change hooks for the inserted text, aside from the case of normal visiting (not with REPLACE), which is done in a new buffer