From 3f897ed5883e2f75796d8f646214ec5e03eca271 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Fri, 4 Feb 2022 10:19:26 -0700 Subject: [PATCH] Clear selection goal column when cutting a full line Co-Authored-By: Antonio Scandurra Co-Authored-By: Max Brunsfeld --- crates/editor/src/editor.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index da6ea878acb61b8411d6ef8fffc6c52f9d5fca7e..55d37ca116bd6adb60bb0205c65ad25d6a362ce4 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -2496,6 +2496,7 @@ impl Editor { if is_entire_line { selection.start = Point::new(selection.start.row, 0); selection.end = cmp::min(max_point, Point::new(selection.end.row + 1, 0)); + selection.goal = SelectionGoal::None; } let mut len = 0; for chunk in buffer.text_for_range(selection.start..selection.end) {