edit prediction: Fix popover positioning when placed above edit (#23902)

Fixes an off-by-one error when the popover was placed above the edit:
<img width="688" alt="Screenshot 2025-01-30 at 11 59 14"
src="https://github.com/user-attachments/assets/938a6626-3f4d-4566-b68c-89b14d48b68d"
/>


Release Notes:

- N/A
This commit is contained in:
Bennet Bo Fenner 2025-01-30 12:16:56 +01:00 committed by GitHub
parent 5e449c84fe
commit 5e210c083f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3527,7 +3527,7 @@ impl EditorElement {
crate::inline_completion_edit_text(&snapshot, edits, edit_preview, false, cx) crate::inline_completion_edit_text(&snapshot, edits, edit_preview, false, cx)
})?; })?;
let line_count = highlighted_edits.text.lines().count() + 1; let line_count = highlighted_edits.text.lines().count();
let longest_row = let longest_row =
editor_snapshot.longest_row_in_range(edit_start.row()..edit_end.row() + 1); editor_snapshot.longest_row_in_range(edit_start.row()..edit_end.row() + 1);