Files
zed/crates/vim/src
Agus Zubiaga 488309b187 helix: Fix paste in deleted diff hunks (#64245)
Closes ZED-73F

# Objective

Pasting in Helix mode while the cursor was inside an expanded deleted
diff hunk could create a selection past the buffer and crash.

## Solution

Track the inserted range with before/after anchors instead of deriving
it from the clipboard text length. If the edit is rejected for
non-editable diff text, both anchors resolve to an empty valid range.

## Testing

Added a regression test for pasting inside an expanded deleted hunk and
ran the Helix paste tests.

## 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 adheres to Zed's UI standards
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

---

Release Notes:

- Fixed a crash when pasting in an expanded deleted diff hunk in Helix
mode
2026-09-15 15:27:26 +00:00
..
2024-07-28 22:44:32 -06:00
2026-09-11 09:13:44 +00:00