• Eli Zaretskii's avatar
    Support bidi reordering of unibyte strings. Fix crash displaying "All" in... · f3014ef5
    Eli Zaretskii authored
    Support bidi reordering of unibyte strings.  Fix crash displaying "All" in mode line of an empty buffer.
    
     src/dispextern.h (struct bidi_string_data): New member `unibyte'.
     src/xdisp.c (handle_single_display_spec, next_overlay_string)
     (get_overlay_strings_1, reseat_1, reseat_to_string)
     (push_display_prop): Set up the `unibyte' member of bidi_it.string
     correctly.  Don't assume unibyte strings are not bidi-reordered.
     (compute_display_string_pos)
     (compute_display_string_end): Fix handling the case of C string.
     src/bidi.c (bidi_count_bytes, bidi_char_at_pos): Accept an
     additional argument UNIBYTE, and support unibyte strings.  All
     callers changed.
     (bidi_fetch_char): Support unibyte strings.
    f3014ef5
bidi.c 71.2 KB