Skip to content

Commit

Permalink
Exit select mode on replace commands
Browse files Browse the repository at this point in the history
  • Loading branch information
xJonathanLEI committed Nov 1, 2022
1 parent 3881fef commit f0f5717
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions helix-term/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1304,6 +1304,7 @@ fn replace(cx: &mut Context) {
});

apply_transaction(&transaction, doc, view);
exit_select_mode(cx);
}
})
}
Expand Down Expand Up @@ -3580,6 +3581,7 @@ fn replace_with_yanked(cx: &mut Context) {
});

apply_transaction(&transaction, doc, view);
exit_select_mode(cx);
}
}
}
Expand Down Expand Up @@ -3612,10 +3614,12 @@ fn replace_selections_with_clipboard_impl(

fn replace_selections_with_clipboard(cx: &mut Context) {
let _ = replace_selections_with_clipboard_impl(cx.editor, ClipboardType::Clipboard, cx.count());
exit_select_mode(cx);
}

fn replace_selections_with_primary_clipboard(cx: &mut Context) {
let _ = replace_selections_with_clipboard_impl(cx.editor, ClipboardType::Selection, cx.count());
exit_select_mode(cx);
}

fn paste(cx: &mut Context, pos: Paste) {
Expand Down

0 comments on commit f0f5717

Please # to comment.