When typing with the macOS Accessibility Keyboard and clicking a word completion suggestion, text was corrupted in several ways. macOS sends `insertText:replacementRange:` when a completion is selected. The replacement range was passed to `selection_replacement_ranges` using the wrong offset type, causing incorrect delta calculation for multi-cursor scenarios. Additionally, `backspace` was called unconditionally even when the replacement range was empty (as with the trailing space the Accessibility Keyboard appends), deleting the last character of every completed word. Finally, an empty replacement range in a multi-cursor context carries a stale cursor position from macOS's single-cursor view of the buffer, so it is now ignored and text is inserted at each cursor's actual position instead. Closes #38052 Release Notes: - Fixed text corruption when using macOS Accessibility Keyboard word completion.
2 files changedLine totals unavailable