mirror of
https://github.com/denisidoro/navi
synced 2024-11-22 03:23:05 +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 {
|
||||
preview: Some(preview),
|
||||
show_all_columns: true,
|
||||
..initial_opts.clone().unwrap_or_else(FinderOpts::var_default)
|
||||
};
|
||||
|
||||
|
|
|
@ -75,8 +75,6 @@ impl FinderChoice {
|
|||
"",
|
||||
"--preview-window",
|
||||
format!("up:{}:nohidden", preview_height).as_str(),
|
||||
"--with-nth",
|
||||
"1,2,3",
|
||||
"--delimiter",
|
||||
deser::terminal::DELIMITER.to_string().as_str(),
|
||||
"--ansi",
|
||||
|
@ -85,6 +83,10 @@ impl FinderChoice {
|
|||
"--exact",
|
||||
]);
|
||||
|
||||
if !opts.show_all_columns {
|
||||
command.args(["--with-nth", "1,2,3"]);
|
||||
}
|
||||
|
||||
if !opts.prevent_select1 {
|
||||
if let Self::Fzf = self {
|
||||
command.arg("--select-1");
|
||||
|
|
|
@ -16,6 +16,7 @@ pub struct Opts {
|
|||
pub column: Option<u8>,
|
||||
pub map: Option<String>,
|
||||
pub prevent_select1: bool,
|
||||
pub show_all_columns: bool,
|
||||
}
|
||||
|
||||
impl Default for Opts {
|
||||
|
@ -34,6 +35,7 @@ impl Default for Opts {
|
|||
delimiter: None,
|
||||
map: None,
|
||||
prevent_select1: true,
|
||||
show_all_columns: false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue