summaryrefslogtreecommitdiff
path: root/src/insdel.c
diff options
context:
space:
mode:
authorDmitry Antipov <dmantipov@yandex.ru>2013-08-06 10:53:09 +0400
committerDmitry Antipov <dmantipov@yandex.ru>2013-08-06 10:53:09 +0400
commite30b79c1c52a4428189ca148c73e7ecc993c6f6a (patch)
treea7f60977d16877bbe0f626429243ea19543ed84e /src/insdel.c
parent00012b86257f33dd4e08e79b814f4a7ad6010713 (diff)
Use region cache to speedup bidi_find_paragraph_start.
* src/buffer.h (struct buffer): New member bidi_paragraph_cache. Rename cache_long_line_scans to cache_long_scans. * src/buffer.c (bset_cache_long_line_scans): Rename to bset_cache_long_scans. (Fget_buffer_create, Fmake_indirect_buffer, Fkill_buffer) (Fbuffer_swap_text, init_buffer_once): Take bidi_paragraph_cache into account. (syms_of_buffer): Rename cache-long-line-scans to cache-long-scans. Adjust docstring. * src/search.c (newline_cache_on_off): * src/indent.c (width_run_cache_on_off): Adjust users. * src/bidi.c (bidi_paragraph_cache_on_off): New function. (bidi_find_paragraph_start): Use bidi_paragraph_cache if needed. * src/insdel.c (prepare_to_modify_buffer): Invalidate bidi_paragraph_cache if enabled. * doc/lispref/positions.texi (Motion by Screen Lines): * doc/lispref/display.texi (Truncation): Rename `cache-long-line-scans' to `cache-long-scans'.
Diffstat (limited to 'src/insdel.c')
-rw-r--r--src/insdel.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/insdel.c b/src/insdel.c
index ac64299a99..f746fd3433 100644
--- a/src/insdel.c
+++ b/src/insdel.c
@@ -1879,6 +1879,10 @@ prepare_to_modify_buffer (ptrdiff_t start, ptrdiff_t end,
invalidate_region_cache (current_buffer,
current_buffer->width_run_cache,
start - BEG, Z - end);
+ if (current_buffer->bidi_paragraph_cache)
+ invalidate_region_cache (current_buffer,
+ current_buffer->bidi_paragraph_cache,
+ start - BEG, Z - end);
}
/* These macros work with an argument named `preserve_ptr'