1
0
Fork 0

workaround terminal width and height calculation problem

This commit is contained in:
Andrey Orst 2018-10-12 13:57:12 +03:00
parent 5568138810
commit d3151b947d

View file

@ -326,7 +326,7 @@ define-command -hidden fzf -params 2..3 %{ evaluate-commands %sh{
else
preview_pos='sleep 0.1; if [ $(tput cols) -gt $(expr $(tput lines) \* 2) ]; then pos=right:50%; else pos=top:60%; fi;'
fi
additional_flags="--preview '($highlighter || cat {}) 2>/dev/null | head -n $kak_opt_fzf_preview_lines' --preview-window=\$pos $additional_flags"
additional_flags="--preview '($highlighter || cat {}) 2>/dev/null | head -n $kak_opt_fzf_preview_lines' --preview-window=\${pos:-right:50%} $additional_flags"
fi
if [ ! -z "${kak_client_env_TMUX}" ]; then