You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tl;dr how to use fzf-tmux but give terminal a chance to recalculate dimensions? ($LINES is stale by the time my $EDITOR runs).
exact steps
background: I have the following pattern of usage when calling fzf-tmux:
# in my bashrc:
$ functionfzft() { fzf-tmux --preview='head --lines="$LINES" {}'; }
$ $EDITOR"$(fzft)"
problem: what happens is that $EDITOR runs it doesn't get the right $LINES value (eg: it runs too fast and gets 59 instead of 119); I can see this is the issue if I tweak my example:
# in my bashrc:
$ functionfzft() { fzf-tmux --preview='head --lines="$LINES" {}'; }
$ echo$LINES
119
$ fzft
.vim/ftplugin/ledger.vim # output from fzft
$ echo$LINES
119
$ fzft;echo$LINES# this emulates what happens in the real use-case described above; $LINES hasn't been recalculated yet...
.vim/ftplugin/ledger.vim # output from fzft
59
Question: has anyone else even seen this issue before? Or am I a special snowflake trying to open the result of an fzf-tmux print? 😛
pasting relevant info from the bug-report template:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
tl;dr how to use fzf-tmux but give terminal a chance to recalculate dimensions? (
$LINES
is stale by the time my$EDITOR
runs).exact steps
background: I have the following pattern of usage when calling
fzf-tmux
:problem: what happens is that
$EDITOR
runs it doesn't get the right$LINES
value (eg: it runs too fast and gets 59 instead of 119); I can see this is the issue if I tweak my example:Question: has anyone else even seen this issue before? Or am I a special snowflake trying to open the result of an
fzf-tmux
print? 😛pasting relevant info from the bug-report template:
man fzf
)Info
fzf --version
outputs0.30
tmux -V
outputs3.2a
nvim --version
outputs0.7.2
5.1.8
Beta Was this translation helpful? Give feedback.
All reactions