diff options
| author | Eli Zaretskii | 2013-11-09 13:12:33 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2013-11-09 13:12:33 +0200 |
| commit | addccbd0c33c921dbd7bba1678112a0e643eff48 (patch) | |
| tree | d4f5a8dd6ed51c07d6755f536585634aca507209 /src | |
| parent | c9df215b4124767def02fcbd83bba1a95171b921 (diff) | |
| download | emacs-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')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/fileio.c | 9 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 59a43d9a391..587b97ecd1f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2013-11-09 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * fileio.c (Finsert_file_contents): Invalidate the newline cache | ||
| 4 | for the entire range of inserted characters. (Bug#15841) | ||
| 5 | |||
| 1 | 2013-11-08 Jan Djärv <jan.h.d@swipnet.se> | 6 | 2013-11-08 Jan Djärv <jan.h.d@swipnet.se> |
| 2 | 7 | ||
| 3 | * xfaces.c (lface_fully_specified_p): Let distant-foreground be | 8 | * xfaces.c (lface_fully_specified_p): Let distant-foreground be |
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 | ||