From ca1ccfd7a4423797c4f7b969878c9d125825c5be Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Wed, 27 Mar 2019 09:41:16 +0300 Subject: [PATCH] use extended height for all commands with previews in tmux --- rc/fzf.kak | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rc/fzf.kak b/rc/fzf.kak index e70ac60..e3f8329 100644 --- a/rc/fzf.kak +++ b/rc/fzf.kak @@ -51,7 +51,7 @@ str fzf_tmux_height '25%' declare-option -docstring "height of fzf tmux split for file preview in screen lines or percents. Default value: 70%%" \ -str fzf_file_preview_tmux_height '70%' +str fzf_preview_tmux_height '70%' declare-option -docstring "width of preview window. Default value: 50%%" \ @@ -122,9 +122,9 @@ fzf -shell-script-completion %{echo "-kak-cmd\n-items-cmd\n-fzf-args\n-post-acti if [ "${preview}" = "true" ]; then # bake position option to define them at runtime if [ -n "${kak_client_env_TMUX}" ]; then - # tmux is special case, so it needs to check if current -kak-cmd is `edit' - [ -z "${kakoune_cmd##edit*}" ] && tmux_height="${kak_opt_fzf_file_preview_tmux_height}" preview_position="pos=right:${kak_opt_fzf_preview_width};" + # tmux height should be changed when preview is on + tmux_height="${kak_opt_fzf_preview_tmux_height}" else preview_position="sleep 0.1; [ \$(tput cols) -gt \$(expr \$(tput lines) \* 2) ] && pos=right:${kak_opt_fzf_preview_width} || pos=top:${kak_opt_fzf_preview_height};" fi