* insdel.c (prepare_to_modify_buffer): Invalidate width run and
authorJim Blandy <jimb@redhat.com>
Sat, 8 Oct 1994 22:14:58 +0000 (22:14 +0000)
committerJim Blandy <jimb@redhat.com>
Sat, 8 Oct 1994 22:14:58 +0000 (22:14 +0000)
newline caches, if they exist.

src/insdel.c

index 833d006..0a76dfa 100644 (file)
@@ -629,6 +629,15 @@ prepare_to_modify_buffer (start, end)
 
   signal_before_change (start, end);
 
+  if (current_buffer->newline_cache)
+    invalidate_region_cache (current_buffer,
+                             current_buffer->newline_cache,
+                             start - BEG, Z - end);
+  if (current_buffer->width_run_cache)
+    invalidate_region_cache (current_buffer,
+                             current_buffer->width_run_cache,
+                             start - BEG, Z - end);
+
   Vdeactivate_mark = Qt;
 }
 \f