Prevent invisible preview window in case of :hidden in FZF_DEFAULT_OPTS (#446)

Fixes #422
This commit is contained in:
Denis Isidoro 2020-12-22 12:04:03 -03:00 committed by GitHub
parent ace2b24960
commit ae3d4cb2be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -147,8 +147,10 @@ impl Finder for FinderChoice {
}; };
command.args(&[ command.args(&[
"--preview",
"",
"--preview-window", "--preview-window",
format!("up:{}", preview_height).as_str(), format!("up:{}:nohidden", preview_height).as_str(),
"--with-nth", "--with-nth",
"1,2,3", "1,2,3",
"--delimiter", "--delimiter",
@ -170,7 +172,9 @@ impl Finder for FinderChoice {
command.arg("--multi"); command.arg("--multi");
} }
SuggestionType::Disabled => { SuggestionType::Disabled => {
command.args(&["--print-query", "--no-select-1"]); if let Self::Fzf = self {
command.args(&["--print-query", "--no-select-1"]);
};
} }
SuggestionType::SnippetSelection => { SuggestionType::SnippetSelection => {
command.args(&["--expect", "ctrl-y,ctrl-o,enter"]); command.args(&["--expect", "ctrl-y,ctrl-o,enter"]);