aboutsummaryrefslogtreecommitdiff
path: root/helix-term
diff options
context:
space:
mode:
authorRyan Mehri2023-11-05 16:12:21 +0000
committerMichael Davis2023-11-18 07:07:57 +0000
commit1271a50a82b596fda0fe33a9cdec7b0c3fb92654 (patch)
treeeec5d5a22411fa18ac8e7a6b1d564c17c53f60df /helix-term
parent34de1cab623c03b2ffdafb54714bc67cbabcf9e9 (diff)
make paste commands exit select mode
Diffstat (limited to 'helix-term')
-rw-r--r--helix-term/src/commands.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs
index 7f9e9d01..4e73568b 100644
--- a/helix-term/src/commands.rs
+++ b/helix-term/src/commands.rs
@@ -4085,22 +4085,27 @@ pub(crate) fn paste_bracketed_value(cx: &mut Context, contents: String) {
};
let (view, doc) = current!(cx.editor);
paste_impl(&[contents], doc, view, paste, count, cx.editor.mode);
+ exit_select_mode(cx);
}
fn paste_clipboard_after(cx: &mut Context) {
paste(cx.editor, '+', Paste::After, cx.count());
+ exit_select_mode(cx);
}
fn paste_clipboard_before(cx: &mut Context) {
paste(cx.editor, '+', Paste::Before, cx.count());
+ exit_select_mode(cx);
}
fn paste_primary_clipboard_after(cx: &mut Context) {
paste(cx.editor, '*', Paste::After, cx.count());
+ exit_select_mode(cx);
}
fn paste_primary_clipboard_before(cx: &mut Context) {
paste(cx.editor, '*', Paste::Before, cx.count());
+ exit_select_mode(cx);
}
fn replace_with_yanked(cx: &mut Context) {
@@ -4160,6 +4165,7 @@ fn paste_after(cx: &mut Context) {
Paste::After,
cx.count(),
);
+ exit_select_mode(cx);
}
fn paste_before(cx: &mut Context) {
@@ -4169,6 +4175,7 @@ fn paste_before(cx: &mut Context) {
Paste::Before,
cx.count(),
);
+ exit_select_mode(cx);
}
fn get_lines(doc: &Document, view_id: ViewId) -> Vec<usize> {