aboutsummaryrefslogtreecommitdiffstats
path: root/src/fileio.c
diff options
context:
space:
mode:
authorEli Zaretskii2013-11-09 13:12:33 +0200
committerEli Zaretskii2013-11-09 13:12:33 +0200
commitaddccbd0c33c921dbd7bba1678112a0e643eff48 (patch)
treed4f5a8dd6ed51c07d6755f536585634aca507209 /src/fileio.c
parentc9df215b4124767def02fcbd83bba1a95171b921 (diff)
downloademacs-addccbd0c33c921dbd7bba1678112a0e643eff48.tar.gz
emacs-addccbd0c33c921dbd7bba1678112a0e643eff48.zip
Fix bug #15841 with cache-long-scans, linum-mode, and non-ASCII chars.
src/fileio.c (Finsert_file_contents): Invalidate the newline cache for the entire range of inserted characters.
Diffstat (limited to 'src/fileio.c')
-rw-r--r--src/fileio.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/fileio.c b/src/fileio.c
index d42b3811d76..2c90d2e3c76 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -49,6 +49,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
49#include "coding.h" 49#include "coding.h"
50#include "window.h" 50#include "window.h"
51#include "blockinput.h" 51#include "blockinput.h"
52#include "region-cache.h"
52#include "frame.h" 53#include "frame.h"
53#include "dispextern.h" 54#include "dispextern.h"
54 55
@@ -4476,6 +4477,14 @@ by calling `format-decode', which see. */)
4476 report_file_errno ("Opening input file", orig_filename, save_errno); 4477 report_file_errno ("Opening input file", orig_filename, save_errno);
4477 } 4478 }
4478 4479
4480 /* We made a lot of deletions and insertions above, so invalidate
4481 the newline cache for the entire region of the inserted
4482 characters. */
4483 if (current_buffer->newline_cache)
4484 invalidate_region_cache (current_buffer,
4485 current_buffer->newline_cache,
4486 PT - BEG, Z - PT - inserted);
4487
4479 if (read_quit) 4488 if (read_quit)
4480 Fsignal (Qquit, Qnil); 4489 Fsignal (Qquit, Qnil);
4481 4490