mirror of
https://github.com/TECHNOFAB11/pay-respects.git
synced 2026-02-02 07:35:10 +01:00
feat: use vim mode in select
This commit is contained in:
parent
0ef6ea1ff9
commit
29c79a5638
2 changed files with 3 additions and 1 deletions
|
|
@ -121,6 +121,7 @@ pub fn cnf(data: &mut Data) {
|
||||||
eprintln!("{}", msg);
|
eprintln!("{}", msg);
|
||||||
eprintln!("{}", hint);
|
eprintln!("{}", hint);
|
||||||
let package = Select::new("\n", packages)
|
let package = Select::new("\n", packages)
|
||||||
|
.with_vim_mode(true)
|
||||||
.without_help_message()
|
.without_help_message()
|
||||||
.with_render_config(render_config)
|
.with_render_config(render_config)
|
||||||
.without_filtering()
|
.without_filtering()
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,7 @@ pub fn select_candidate(data: &mut Data) {
|
||||||
let confirm = format!("[{}]", t!("confirm-yes")).green();
|
let confirm = format!("[{}]", t!("confirm-yes")).green();
|
||||||
let hint = format!(
|
let hint = format!(
|
||||||
"{} {} {}",
|
"{} {} {}",
|
||||||
"[↑/↓]".blue(),
|
"[↓/↑] / [j/k]".blue(),
|
||||||
confirm,
|
confirm,
|
||||||
"[Ctrl+C]".red()
|
"[Ctrl+C]".red()
|
||||||
);
|
);
|
||||||
|
|
@ -109,6 +109,7 @@ pub fn select_candidate(data: &mut Data) {
|
||||||
|
|
||||||
let ans = Select::new("\n", highlight_candidates.clone())
|
let ans = Select::new("\n", highlight_candidates.clone())
|
||||||
.with_page_size(1)
|
.with_page_size(1)
|
||||||
|
.with_vim_mode(true)
|
||||||
.without_filtering()
|
.without_filtering()
|
||||||
.without_help_message()
|
.without_help_message()
|
||||||
.with_render_config(render_config)
|
.with_render_config(render_config)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue