From 03a4c9d6d52251fe3bb9a2624984aa00ba7381bd Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Wed, 5 Apr 2023 14:15:58 +0200 Subject: [PATCH] Use the cursor variable instead of selection.start --- crates/editor/src/editor.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index b2232d8df274dc1e80c7de7f0856d21c2c9f4c66..f28c82407a9ff75d72f23f085dec4ad1c3782c9d 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -3282,7 +3282,7 @@ impl Editor { // Accept copilot suggestion if there is only one selection and the cursor is not // in the leading whitespace. if self.selections.count() == 1 - && selection.start.column >= current_indent.len + && cursor.column >= current_indent.len && self.has_active_copilot_suggestion(cx) { self.accept_copilot_suggestion(cx);