From 4e6c9a857511fccdbbc835a1c9acb205b6486a4c Mon Sep 17 00:00:00 2001 From: Zeming Lin Date: Mon, 15 Mar 2021 12:27:22 -0700 Subject: [PATCH] fix fzf_use_main_selection on multi-line If your `kak_selection` has multiple lines and `fzf_use_main_selection` is true, then the preview window would not even show up. This fixes that error. --- rc/fzf.kak | 1 + 1 file changed, 1 insertion(+) diff --git a/rc/fzf.kak b/rc/fzf.kak index 1408abb..7bff9df 100644 --- a/rc/fzf.kak +++ b/rc/fzf.kak @@ -145,6 +145,7 @@ fzf -params .. %{ evaluate-commands %sh{ [ "${kak_opt_fzf_use_main_selection}" = "true" ] && \ [ $(printf "%s" "${kak_selection}" | wc -m) -gt 1 ] && \ + [ $(printf "%s" "${kak_selection}" | wc -l) -eq 1 ] && \ default_query="-i -q ${kak_selection}" while [ $# -gt 0 ]; do