Closed jbarap closed 7 months ago
This is an upstream bug, apparently when ansi colors are used in the entries it bugs out the second match.
As a workaround you can disable coloring until this gets solved upstream:
:FzfLua files color_icons=false
Huh, interesting. Thank you for the quick response!
Huh, interesting. Thank you for the quick response!
Interesting bug, this only happens to entries that contain an ansi color escape sequence.
Run this in the shell:
echo "\x1b[0;34mblue\x1b[0m\n\x1b[0;34mblue\x1b[0m\n\x1b[0;34mblue\x1b[0m" | fzf --ansi
Now, input bl bl
and the match is cleared:
Now run this (last entry isn't color coded):
echo "\x1b[0;34mblue\x1b[0m\n\x1b[0;34mblue\x1b[0m\n\x1b[0;34mblue\x1b[0m\nblue" | fzf --ansi
If you input bl bl
again, the entries that have an ansi escape sequence have the bug, but the clear entry does not:
Reported upstream: https://github.com/junegunn/fzf/issues/3596
Thanks! I was just looking for an issue upstream that mentioned something about this.
Thanks! I was just looking for an issue upstream that mentioned something about this.
You're obviously onto some serious edge case here :-)
@jbarap, fixed on upstream master via https://github.com/junegunn/fzf/commit/2a8b65e105ec1a1a9d4cecf947b7267f04453b7c, closing.
Info
nvim --version
: v0.10.0-dev-2133+g5a8fe0769fzf --version
: 0.29 (devel)mini.sh
Description
When typing a word twice, the characters matched in the second word will clear the matches from the first one.
To reproduce:
Go to the main neovim repo
Run
sh -c "$(curl -s https://raw.githubusercontent.com/ibhagwan/fzf-lua/main/scripts/mini.sh)"
Enter find files with
<C-p>
Type "funcs" into the prompt. The first two files will be the correctly matched files
funcs.h
andfuncs.c
, with only the "funcs' characters highlighted as matches.Type an additional " funcs", such that the full prompt now reads "funcs funcs". The order of the files won't change, but now all the highlights of the matched characters will disappear.
The behavior doesn't appear to be the same with just the fzf cli:
Great job with the plugin btw.