-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
keybind not working: delete_selection_noyank, search_prev #10050
Comments
The _noyank commands set the register to helix/helix-term/src/commands.rs Lines 2698 to 2710 in 0da5865
could be updated to save the value of EDIT: or instead, pass a boolean for wether to yank or not. Passing in the |
Something along these lines? fn delete_selection_noyank(cx: &mut Context) {
let old_register = cx.register;
cx.register = Some('_');
delete_selection_impl(cx, Operation::Delete);
cx.register = old_register;
}
fn change_selection(cx: &mut Context) {
// let old_register = cx.register;
delete_selection_impl(cx, Operation::Change);
// cx.register = old_register;
}
fn change_selection_noyank(cx: &mut Context) {
let old_register = cx.register;
cx.register = Some('_');
delete_selection_impl(cx, Operation::Change);
cx.register = old_register;
} |
On second thought I would prefer we introduce an extra parameter fn delete_selection(cx: &mut Context) {
delete_selection_impl(cx, Operation::Delete, true);
}
fn delete_selection_noyank(cx: &mut Context) {
delete_selection_impl(cx, Operation::Delete, false);
}
fn change_selection(cx: &mut Context) {
delete_selection_impl(cx, Operation::Change, true);
}
fn change_selection_noyank(cx: &mut Context) {
delete_selection_impl(cx, Operation::Change, false);
} It would mean that we do an unnecessary allocation when you use |
I think "C-l" = [
":append-output echo -n =",
"search_selection",
"delete_selection_noyank",
"search_prev",
] appends an Eg: Let the file contents be:
Can anyone confirm that what I said above is correct? |
Summary
This should do the same as
?=<enter>
. This works if I replace delete_selection_noyank with delete_selection.The response on matrix was:
https://matrix.to/#/!zMuVRxoqjyxyjSEBXc:matrix.org/$nt9EkBO1jiVDOp1LDJf0hBHk_MmipL6RttvCJMU1-es?via=matrix.org&via=tchncs.de&via=mozilla.org
Reproduction Steps
No response
Helix log
No response
Platform
Linux
Terminal Emulator
Alacritty
Installation Method
AUR
Helix Version
helix 23.10
The text was updated successfully, but these errors were encountered: