Callers cannot detect plugin-side behavior. fzf#exec() reports the version
of the binary, not of this plugin, and everything else here is script-local.
fzf.vim needs to know whether fzf#run is asynchronous in popup mode before
offering a key binding that depends on it.
The value was only ever read through the exists() guard, so raising it from
1 breaks nothing.
Popup mode held the fzf process with system(), which froze Vim until fzf
exited. fzf in a popup draws in a pane of its own, so that process only
waits for it and does not need a window. Hold it with a job instead and
Vim keeps processing its event loop, which is what a live preview needs.
Nothing is displayed for the job. Falls back to the blocking path when
the job cannot start, so the sink still runs and temp files are removed.
- job_start() sets $TERM=dumb and the popup inherits the environment, so
fzf dropped to its 16-color scheme. Restore it via 'env', or in the
command itself before 8.0.902, when 'env' was added
- Fullscreen now uses a terminal buffer in a new tab on Vim too. use_term
lacked parentheses, so && bound tighter than || and the layout test was
dead on Neovim, which already behaved this way
- fzf#run returns an empty list in these modes. Callers use sink,
sinklist or exit, and the vader specs now wait for completion
- Append --no-tmux only when the spec asks for a Vim window, so --popup
in $FZF_DEFAULT_OPTS survives a spec with no layout option
Accept popup as a synonym of the tmux layout key, matching --popup being
the name of --tmux. popup wins when both are given.
s:tmux_enabled():
- Accept $ZELLIJ, which --popup covers as well
- Parse tmux -V with matchstr and compare with s:compare_versions. The
old string comparison against 'tmux 1.7' misreads 10.0
- Drop the fzf-tmux requirement on tmux 3.3 or above, where --tmux needs
no script. Removing the script silently disabled popups entirely
- Resolve the script where it is used, and anchor the legacy test to ^-
so a --tmux value containing a dash, as in 90%,60%,border-native, is
not mistaken for a legacy flag
* 'pathname' is a new tiebreak option for prioritizing matches occurring
in the file name of the path.
* `--scheme=path` will automatically set `--tiebreak=pathname,length`.
* fzf will automatically choose `path` scheme when the input is a TTY device,
where fzf would start its built-in walker or run `$FZF_DEFAULT_COMMAND`
which is usually a command for listing files.
Close#4191
A spec can have `exit` callback that is called with the exit status of fzf.
This can be used to clean up temporary resources or restore the original
state when fzf is closed without a selection.
* make :FZF work in Vim from Git Bash
Despite its title 'Calling fzf#run with a list as source fail (n)vim is used from git bash' the issue in
https://github.com/junegunn/fzf/issues/3777
of running `:FZF` in Vim in Git Bash was apparently only fixed for Neovim in Git Bash on Windows 11, but not for Vim from Git Bash.
In view of this, replacing /C by ///C might be considered a universal fix.
This PR just proposes the patch in https://github.com/junegunn/fzf/issues/1983 that still seems open.
In view of the fourth item in the most recent 2.45.0 https://github.com/git-for-windows/build-extra/blob/main/ReleaseNotes.md#known-issues little seems to have changed regarding path conversion of arguments containing forward slashes
* prefer doubling slashed instead of generic env. var
If MSYS_NO_PATHCONV=1 is used, then all arguments are preserved, in particular possibly paths passed in s:command.
Therefore, only avoid converting `/C` from `cmd` to a path.
And simplify the argument escaping code. Fix#3764.
This may breaks some existing use cases, but the mode causes too much
trouble when escaping arguments and it makes some things not possible.
# Now you can pass special characters to rg process without any escaping problems: &|<>()@^%!
fzf --ansi --disabled --bind "change:reload:rg --column --line-number --no-heading --color=always --smart-case -- {q}"
# No sudden expansion of the arguments on '!'
fzf --disabled --preview "echo {q} {n} {}" --query "&|<>()@^%!" --prompt "&|<>()@^%!"
In Neovim, the foreground and background colors of a floating window
defaults to those of Pmenu highlight group, which yields unexpected
results.
This commit makes the colors of fzf window defaults to those of 'Normal'
group (or 'NormalFloat' if defined), by ignoring Pmenu group.
Then the colors can be configured via --color option of fzf.
NOTE: An error from setwinvar call is ignored because the exact
behavior of &winhighlight with an empty target group is not clearly
documented.
Close#3035
Close https://github.com/junegunn/fzf.vim/issues/1431
See https://github.com/neovim/neovim/pull/9722#discussion_r264777602