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