Fix Helix append escape cursor restore (#57736)

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes #54231

Related to the Opire Helix keymap bounty on #4642.
/claim #4642
Opire payout: @jamilahmadzai

Release Notes:

- Fixed Helix mode append so pressing Escape without inserting text
restores the original cursor or selection instead of leaving it one
character ahead.

---------

Co-authored-by: Tom Houlé <tom@tomhoule.com>
945764f953Jamil Ur Rehman Ahmadzai committed on 7/28/2026, 1:31:57 PM· committed by GitHubparentfee527c
3 files changedLine totals unavailable