mirror of
https://github.com/denisidoro/navi
synced 2024-11-21 19:13:07 +00:00
Prevent variable selection content from being limited to 3 columns (#821)
This commit is contained in:
parent
8963749e6a
commit
f6414551bb
3 changed files with 7 additions and 2 deletions
|
@ -101,6 +101,7 @@ fn prompt_finder(
|
||||||
|
|
||||||
let mut opts = FinderOpts {
|
let mut opts = FinderOpts {
|
||||||
preview: Some(preview),
|
preview: Some(preview),
|
||||||
|
show_all_columns: true,
|
||||||
..initial_opts.clone().unwrap_or_else(FinderOpts::var_default)
|
..initial_opts.clone().unwrap_or_else(FinderOpts::var_default)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -75,8 +75,6 @@ impl FinderChoice {
|
||||||
"",
|
"",
|
||||||
"--preview-window",
|
"--preview-window",
|
||||||
format!("up:{}:nohidden", preview_height).as_str(),
|
format!("up:{}:nohidden", preview_height).as_str(),
|
||||||
"--with-nth",
|
|
||||||
"1,2,3",
|
|
||||||
"--delimiter",
|
"--delimiter",
|
||||||
deser::terminal::DELIMITER.to_string().as_str(),
|
deser::terminal::DELIMITER.to_string().as_str(),
|
||||||
"--ansi",
|
"--ansi",
|
||||||
|
@ -85,6 +83,10 @@ impl FinderChoice {
|
||||||
"--exact",
|
"--exact",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
if !opts.show_all_columns {
|
||||||
|
command.args(["--with-nth", "1,2,3"]);
|
||||||
|
}
|
||||||
|
|
||||||
if !opts.prevent_select1 {
|
if !opts.prevent_select1 {
|
||||||
if let Self::Fzf = self {
|
if let Self::Fzf = self {
|
||||||
command.arg("--select-1");
|
command.arg("--select-1");
|
||||||
|
|
|
@ -16,6 +16,7 @@ pub struct Opts {
|
||||||
pub column: Option<u8>,
|
pub column: Option<u8>,
|
||||||
pub map: Option<String>,
|
pub map: Option<String>,
|
||||||
pub prevent_select1: bool,
|
pub prevent_select1: bool,
|
||||||
|
pub show_all_columns: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for Opts {
|
impl Default for Opts {
|
||||||
|
@ -34,6 +35,7 @@ impl Default for Opts {
|
||||||
delimiter: None,
|
delimiter: None,
|
||||||
map: None,
|
map: None,
|
||||||
prevent_select1: true,
|
prevent_select1: true,
|
||||||
|
show_all_columns: false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue