Skip to content

Commit

Permalink
Exit select mode on surround commands (#4858)
Browse files Browse the repository at this point in the history
  • Loading branch information
xJonathanLEI authored Nov 24, 2022
1 parent ee06d4d commit 1d21683
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions helix-term/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4582,6 +4582,7 @@ fn surround_add(cx: &mut Context) {
let transaction = Transaction::change(doc.text(), changes.into_iter())
.with_selection(Selection::new(ranges, selection.primary_index()));
apply_transaction(&transaction, doc, view);
exit_select_mode(cx);
})
}

Expand Down Expand Up @@ -4621,6 +4622,7 @@ fn surround_replace(cx: &mut Context) {
}),
);
apply_transaction(&transaction, doc, view);
exit_select_mode(cx);
});
})
}
Expand Down Expand Up @@ -4648,6 +4650,7 @@ fn surround_delete(cx: &mut Context) {
let transaction =
Transaction::change(doc.text(), change_pos.into_iter().map(|p| (p, p + 1, None)));
apply_transaction(&transaction, doc, view);
exit_select_mode(cx);
})
}

Expand Down

0 comments on commit 1d21683

Please sign in to comment.