Speed up keyboard auto-repeat cursor motion under bidi redisplay.
src/xdisp.c (compute_stop_pos_backwards): New function. (next_element_from_buffer): Call compute_stop_pos_backwards to find a suitable prev_stop when we find ourselves before base_level_stop. (reseat): Don't look for prev_stop, as that could mean a very long run. <cached_disp_pos, cached_disp_buffer, cached_disp_modiff> <cached_disp_overlay_modiff>: Cache for last found display string position. (compute_display_string_pos): Return the cached position if asked about the same buffer in the same area of character positions, and the buffer wasn't changed since the time the display string position was cached.
Showing with 137 additions and 24 deletions