aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan LEI2022-11-24 02:07:19 +0000
committerGitHub2022-11-24 02:07:19 +0000
commit1d21683321b9f94161be14b4ec5b506ed1669c7f (patch)
treefa1cdbbaf5b69f676672e578f1349e2e2afe2b0e
parentee06d4d337af7a46de294d88c00104b2ae836455 (diff)
Exit select mode on surround commands (#4858)
-rw-r--r--helix-term/src/commands.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs
index 4eb9742f..659d353e 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);
})
}