emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-24 r117696: Fix bug #18982 with assertion violations


From: Eli Zaretskii
Subject: [Emacs-diffs] emacs-24 r117696: Fix bug #18982 with assertion violations when reverting buffers.
Date: Sun, 09 Nov 2014 16:41:33 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 117696
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/18982
committer: Eli Zaretskii <address@hidden>
branch nick: emacs-24
timestamp: Sun 2014-11-09 18:40:43 +0200
message:
  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.
modified:
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/fileio.c                   fileio.c-20091113204419-o5vbwnq5f7feedwu-210
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2014-11-09 15:57:37 +0000
+++ b/src/ChangeLog     2014-11-09 16:40:43 +0000
@@ -1,5 +1,8 @@
 2014-11-09  Eli Zaretskii  <address@hidden>
 
+       * 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)
 

=== modified file 'src/fileio.c'
--- a/src/fileio.c      2014-10-28 17:48:21 +0000
+++ b/src/fileio.c      2014-11-09 16:40:43 +0000
@@ -4308,8 +4308,11 @@
       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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]