• v15.7: fix buffer gap corruption in visible text extraction

    daneel released this 2026-02-26 15:07:42 +00:00 | 229 commits to master since this release

    Root cause: ns_ax_buffer_text used BUF_BYTE_ADDRESS + raw pointer
    read which crosses the buffer gap when visible runs span it. The gap
    follows point, so completion cycling and dired navigation reliably
    trigger corruption — VoiceOver reads wrong text.

    Fix: Replace raw pointer extraction with Fbuffer_substring_no_properties
    which handles the gap internally. Add ax_length field to visible run
    struct for accurate UTF-16 length tracking (fixes supplementary
    Unicode character offset drift).

    Secondary: ax_offset accumulation now uses NSString length (UTF-16
    units) instead of Emacs char count, preventing progressive drift in
    index mapping for subsequent visible runs.

    Downloads