Empty the bidi cache "stack" when it->sp is zeroed.
authorEli Zaretskii <eliz@gnu.org>
Tue, 5 Jul 2011 17:06:29 +0000 (20:06 +0300)
committerEli Zaretskii <eliz@gnu.org>
Tue, 5 Jul 2011 17:06:29 +0000 (20:06 +0300)
commit57b3e30bb29d904180b651422ab58341debe84cb
treecb6561a3ef8100dc64654beb65c70623798839aa
parented94e6d7bf6751592ff3dadb2b87f03ffaab3bfa
Empty the bidi cache "stack" when it->sp is zeroed.
Solves crashes due to overflow of bidi cache stack.
Make sure cache is saved and restored around all temporary iterations.

 src/dispnew.c (buffer_posn_from_coords): Save and restore the bidi
 cache around display iteration.
 src/window.c (Fwindow_end, window_scroll_pixel_based)
 (displayed_window_lines, Frecenter): Save and restore the bidi
 cache around display iteration.
 src/bidi.c (bidi_unshelve_cache): Ensure we have enough space before
 restoring the shelved cache.
 (bidi_cache_ensure_space): Don't assume the required size is just
 one BIDI_CACHE_CHUNK away.
 src/xdisp.c (back_to_previous_visible_line_start, reseat_1)
 (init_iterator): Empty the bidi cache "stack".
src/ChangeLog
src/bidi.c
src/dispnew.c
src/indent.c
src/window.c
src/xdisp.c