Add ctrl-r binding for toggle-all (#402)

This commit is contained in:
Denis Isidoro 2020-09-14 09:06:29 -03:00 committed by GitHub
parent 4cbbe38712
commit 0e902d3230
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -119,6 +119,12 @@ impl Finder for FinderChoice {
_ => 2,
};
let bindings = if opts.suggestion_type == SuggestionType::MultipleSelections {
",ctrl-r:toggle-all"
} else {
""
};
command.args(&[
"--preview-window",
format!("up:{}", preview_height).as_str(),
@ -128,7 +134,7 @@ impl Finder for FinderChoice {
display::DELIMITER.to_string().as_str(),
"--ansi",
"--bind",
"ctrl-j:down,ctrl-k:up",
format!("ctrl-j:down,ctrl-k:up{}", bindings).as_str(),
"--exact",
]);