[fzf-tmux] Do not set --margin 0,1 on tmux 3.3 or above

Close #3162
This commit is contained in:
Junegunn Choi 2023-02-13 14:48:10 +09:00
parent 96c3de12eb
commit b1619f675f
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

View File

@ -179,9 +179,10 @@ trap 'cleanup' EXIT
envs="export TERM=$TERM "
if [[ "$opt" =~ "-E" ]]; then
FZF_DEFAULT_OPTS="--margin 0,1 $FZF_DEFAULT_OPTS"
tmux_version=$(tmux -V)
if [[ ! $tmux_version =~ 3\.2 ]]; then
if [[ $tmux_version =~ ^3\.2[a-z]?$ ]]; then
FZF_DEFAULT_OPTS="--margin 0,1 $FZF_DEFAULT_OPTS"
else
FZF_DEFAULT_OPTS="--border $FZF_DEFAULT_OPTS"
opt="-B $opt"
fi