mirror of
https://github.com/zed-industries/zed.git
synced 2026-11-19 23:20:18 +01:00
5505e63a0d
When `trim_completion()` creates new anchors from the current buffer state, `completion.snapshot` was not being updated, leaving it with the older snapshot from when the prediction was initially fetched. This caused a panic in `interpolate_edits()` when trying to resolve anchors with Lamport timestamps newer than what the old snapshot had observed. The fix ensures that `completion.snapshot` is updated whenever new anchors are created in `trim_completion()`, keeping the snapshot and anchors consistent. Closes #45956 Release Notes: - Fixed a panic in Copilot edit predictions caused by anchor/snapshot version mismatch