Skip to content
Myr

[fzf-tmux] Do not split pane if the height is too small

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Junegunn Choi · committed by Junegunn Choi · parent bb70923 · Browse files · 1 file+3 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−2 removed

  • other:+3 added−2 removed

1 file+3 added−2 removed

modified:bin/fzf-tmux+3 added-2 removed
6 unmodified lines
7skip=""8swap=""9close=""10term=""11[ -n "$LINES" ] && lines=$LINES || lines=$(tput lines)12while [ $# -gt 0 ]; do13 arg="$1"14 case "$arg" in15 -)
44 unmodified lines
60 if [ -n "$swap" ]; then61 if [[ "$arg" =~ ^.l ]]; then62 [ -n "$COLUMNS" ] && max=$COLUMNS || max=$(tput cols)63 else63 [ -n "$LINES" ] && max=$LINES || max=$(tput lines)64 max=$lines65 fi66 size=$(( max - size ))67 [ $size -lt 0 ] && size=068 opt="$opt -l $size"
13 unmodified lines
82 esac83 shift84done8585if [ -z "$TMUX" ]; then86if ! [ -n "$TMUX_PANE" -a $lines -gt 15 ]; then87 fzf "${args[@]}"88 exit $?89fi90
69 unmodified lines