• Eli Zaretskii's avatar
    Fix bug #9470 with slow redisplay in huge single-paragraph buffers. · 1137e8b8
    Eli Zaretskii authored
     src/bidi.c (MAX_PARAGRAPH_SEARCH): New macro.
     (bidi_find_paragraph_start): Search back for paragraph beginning
     at most MAX_PARAGRAPH_SEARCH lines; if not found, return BEGV_BYTE.
     (bidi_move_to_visually_next): Only trigger paragraph-related
     computations when the last character is a newline or at EOB, not
     just any NEUTRAL_B.
     src/xdisp.c (reseat_at_next_visible_line_start): Keep information
     about the current paragraph and restore it after the call to
     reseat.
    1137e8b8
bidi.c 77.2 KB