src/fileio.c (Finsert_file_contents): Invalidate the newline cache
for the entire range of inserted characters.
+2013-11-09 Eli Zaretskii <eliz@gnu.org>
+
+ * fileio.c (Finsert_file_contents): Invalidate the newline cache
+ for the entire range of inserted characters. (Bug#15841)
+
2013-11-08 Jan Djärv <jan.h.d@swipnet.se>
* xfaces.c (lface_fully_specified_p): Let distant-foreground be
#include "coding.h"
#include "window.h"
#include "blockinput.h"
+#include "region-cache.h"
#include "frame.h"
#include "dispextern.h"
report_file_errno ("Opening input file", orig_filename, save_errno);
}
+ /* We made a lot of deletions and insertions above, so invalidate
+ the newline cache for the entire region of the inserted
+ characters. */
+ if (current_buffer->newline_cache)
+ invalidate_region_cache (current_buffer,
+ current_buffer->newline_cache,
+ PT - BEG, Z - PT - inserted);
+
if (read_quit)
Fsignal (Qquit, Qnil);