diff options
author | Mike Hearn <github@mikehearn.net> | 2017-08-31 22:16:00 -0400 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2017-09-01 11:16:00 +0900 |
commit | 9b9c67b768ce4986613e4162af1f57b5b21b5fa6 (patch) | |
tree | bc6f495298f03be6db46cac98cfa12f349b5925b /bin | |
parent | 5b7457ff08668efef879174fc7f855fc77d6d18d (diff) |
[fzf-tmux] Add pane_height/pane_width fallback (#1037)
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/fzf-tmux | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/fzf-tmux b/bin/fzf-tmux index c3834f73..d509f6af 100755 --- a/bin/fzf-tmux +++ b/bin/fzf-tmux @@ -16,8 +16,8 @@ skip="" swap="" close="" term="" -[[ -n "$LINES" ]] && lines=$LINES || lines=$(tput lines) -[[ -n "$COLUMNS" ]] && columns=$COLUMNS || columns=$(tput cols) +[[ -n "$LINES" ]] && lines=$LINES || lines=$(tput lines) || lines=$(tmux display-message -p "#{pane_height}") +[[ -n "$COLUMNS" ]] && columns=$COLUMNS || columns=$(tput cols) || columns=$(tmux display-message -p "#{pane_width}") help() { >&2 echo 'usage: fzf-tmux [-u|-d [HEIGHT[%]]] [-l|-r [WIDTH[%]]] [--] [FZF OPTIONS] |