on master help sign in
Exit select mode on surround commands (#4858)
1d21683Jonathan LEI
helix-term/src/commands.rs+3
@@ -4582,6 +4582,7 @@ fn surround_add(cx: &mut Context) {
4582 let transaction = Transaction::change(doc.text(), changes.into_iter())
4582 let transaction = Transaction::change(doc.text(), changes.into_iter())
4583 .with_selection(Selection::new(ranges, selection.primary_index()));
4583 .with_selection(Selection::new(ranges, selection.primary_index()));
4584 apply_transaction(&transaction, doc, view);
4584 apply_transaction(&transaction, doc, view);
4585+ exit_select_mode(cx);
4585 })
4586 })
4586}
4587}
4587
4588
@@ -4621,6 +4622,7 @@ fn surround_replace(cx: &mut Context) {
4621 }),
4622 }),
4622 );
4623 );
4623 apply_transaction(&transaction, doc, view);
4624 apply_transaction(&transaction, doc, view);
4625+ exit_select_mode(cx);
4624 });
4626 });
4625 })
4627 })
4626}
4628}
@@ -4648,6 +4650,7 @@ fn surround_delete(cx: &mut Context) {
4648 let transaction =
4650 let transaction =
4649 Transaction::change(doc.text(), change_pos.into_iter().map(|p| (p, p + 1, None)));
4651 Transaction::change(doc.text(), change_pos.into_iter().map(|p| (p, p + 1, None)));
4650 apply_transaction(&transaction, doc, view);
4652 apply_transaction(&transaction, doc, view);
4653+ exit_select_mode(cx);
4651 })
4654 })
4652}
4655}
4653
4656