Merge pull request #424 from zed-industries/fix-goal-column-on-cut

Clear selection goal column when cutting a full line
This commit is contained in:
Antonio Scandurra 2022-02-04 19:01:23 +01:00 committed by GitHub
commit fe1729ff70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2498,6 +2498,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) {