Skip to content

Commit

Permalink
[fzf-tmux] Do not set --margin 0,1 on tmux 3.3 or above
Browse files Browse the repository at this point in the history
Close #3162
  • Loading branch information
junegunn committed Feb 13, 2023
1 parent 96c3de1 commit b1619f6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bin/fzf-tmux
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b1619f6

Please sign in to comment.