# edit_prediction: Prevent v4 cursor marker leaks \(\#61957\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/4f047acc1780eceed5be1f3dfd3f9ee652ed14cb)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 4f047acc1780eceed5be1f3dfd3f9ee652ed14cb

Requested commit: 4f047acc1780eceed5be1f3dfd3f9ee652ed14cb

Commit: 4f047acc1780eceed5be1f3dfd3f9ee652ed14cb

Tree: 92334cbf9f258b4d5d965409faa03f709152d0e7

Author: Ben Kunkle

Committer: GitHub

## Message

```
edit_prediction: Prevent v4 cursor marker leaks (#61957)

# Objective

Prevent V4 cursor markers from appearing in edit prediction previews or
accepted edits.

## Solution

Replace the cursor marker with an internal sentinel before sub-line
diffing, so matching source text cannot reconstruct the marker.

## 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
```

## Parents

- [b209000d28820ed69fe5fa9c0749a12c6a44f0f4](https://git.cafe/gitcafe/zed/commit/b209000d28820ed69fe5fa9c0749a12c6a44f0f4?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/4f047acc1780eceed5be1f3dfd3f9ee652ed14cb?format=markdown)
