From d7d33881992d86f46e1626af49e281d478aa8b43 Mon Sep 17 00:00:00 2001 From: Jonathan LEI Date: Wed, 23 Nov 2022 07:57:22 +0000 Subject: [PATCH] Exit select mode on surround commands --- helix-term/src/commands.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index 8af5a7e3e400..c47bfdc7fec1 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -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); }) } @@ -4621,6 +4622,7 @@ fn surround_replace(cx: &mut Context) { }), ); apply_transaction(&transaction, doc, view); + exit_select_mode(cx); }); }) } @@ -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); }) }