Fix panic when deleting just-generated text (cherry-pick #10282) (#10287)
gcp-cherry-pick-bot[bot]
,
Thorsten Ball
, and
Conrad
created
Cherry-picked Fix panic when deleting just-generated text (#10282)
We ran into a panic when deleting text that was just generated by a code
action.
This fixes it by ensuring we don't run into a 0-minus-1 panic when a
buffer_range is empty.
Release Notes:
- Fixed panic that could occur when deleting generated-by-unsaved text.
Co-authored-by: Conrad <conrad@zed.dev>
Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
Co-authored-by: Conrad <conrad@zed.dev>