summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis Isidoro <denisidoro@users.noreply.github.com>2020-12-22 12:04:03 -0300
committerGitHub <noreply@github.com>2020-12-22 12:04:03 -0300
commitae3d4cb2be251fce2ab8b03605833b6fe2b80629 (patch)
tree9777877a79b8a8688d4e164e8df3596502793df4
parentace2b2496007ba5b77e2fcfd22a2ce61d0adc9cf (diff)
Prevent invisible preview window in case of :hidden in FZF_DEFAULT_OPTS (#446)
Fixes #422
-rw-r--r--src/finder.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/finder.rs b/src/finder.rs
index 2486dc8..8eabef5 100644
--- a/src/finder.rs
+++ b/src/finder.rs
@@ -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"]);