From 5e210c083fc4d1a00c9a7dac7abf185351bb9b3e Mon Sep 17 00:00:00 2001 From: Bennet Bo Fenner Date: Thu, 30 Jan 2025 12:16:56 +0100 Subject: [PATCH] edit prediction: Fix popover positioning when placed above edit (#23902) Fixes an off-by-one error when the popover was placed above the edit: Screenshot 2025-01-30 at 11 59 14 Release Notes: - N/A --- crates/editor/src/element.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs index 93eadc5393ad9cdd36346a117b079ff175f39940..01c87e31c406c6c4384dea79dba5d06d0489196a 100644 --- a/crates/editor/src/element.rs +++ b/crates/editor/src/element.rs @@ -3527,7 +3527,7 @@ impl EditorElement { 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 = editor_snapshot.longest_row_in_range(edit_start.row()..edit_end.row() + 1);