ep: Fix cursor marker leak due to edit splitting in V4 API (#60110)

# Objective

Closes EP-202

Prevent V4 edit predictions from leaking `<|user_cursor|>` markers into
users' buffers.

## Solution

- Strip cursor marker text from emitted prediction edits, including when
`text_diff` splits the marker across edit fragments.
- Preserve literal marker-like text that already exists in the buffer.

## Testing

- `cargo test -p edit_prediction prediction_edits_for_single_file_diff
-- --nocapture`
- `cargo test -p edit_prediction --lib`
- `cargo fmt --check`

## 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
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

---

Release Notes:

- N/A
29faf94a0fBen Kunkle committed on 6/29/2026, 7:00:22 PM· committed by GitHubparent3bb9220
1 file changedLine totals unavailable