Skip to content

Commit 25c3982

Browse files
xJonathanLEIFrederik Vestre
authored andcommitted
Exit select mode on surround commands (helix-editor#4858)
1 parent b53faa5 commit 25c3982

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

helix-term/src/commands.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4582,6 +4582,7 @@ fn surround_add(cx: &mut Context) {
45824582
let transaction = Transaction::change(doc.text(), changes.into_iter())
45834583
.with_selection(Selection::new(ranges, selection.primary_index()));
45844584
apply_transaction(&transaction, doc, view);
4585+
exit_select_mode(cx);
45854586
})
45864587
}
45874588

@@ -4621,6 +4622,7 @@ fn surround_replace(cx: &mut Context) {
46214622
}),
46224623
);
46234624
apply_transaction(&transaction, doc, view);
4625+
exit_select_mode(cx);
46244626
});
46254627
})
46264628
}
@@ -4648,6 +4650,7 @@ fn surround_delete(cx: &mut Context) {
46484650
let transaction =
46494651
Transaction::change(doc.text(), change_pos.into_iter().map(|p| (p, p + 1, None)));
46504652
apply_transaction(&transaction, doc, view);
4653+
exit_select_mode(cx);
46514654
})
46524655
}
46534656

0 commit comments

Comments
 (0)