• Eli Zaretskii's avatar
    Empty the bidi cache "stack" when it->sp is zeroed. · 57b3e30b
    Eli Zaretskii authored
    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".
    57b3e30b
dispnew.c 193 KB