1
0
Fork 0

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.
This commit is contained in:
Zeming Lin 2021-03-15 12:27:22 -07:00 committed by Andrey Listopadov
parent 94b259cbd8
commit 4e6c9a8575

View file

@ -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