1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-07 12:20:39 -08:00

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.
This commit is contained in:
Eli Zaretskii 2013-11-09 13:12:33 +02:00
parent c9df215b41
commit addccbd0c3
2 changed files with 14 additions and 0 deletions

View file

@ -1,3 +1,8 @@
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

View file

@ -49,6 +49,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include "coding.h"
#include "window.h"
#include "blockinput.h"
#include "region-cache.h"
#include "frame.h"
#include "dispextern.h"
@ -4476,6 +4477,14 @@ by calling `format-decode', which see. */)
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);