Closed Frederick888 closed 3 years ago
When you say it breaks outline, is it just the preview that is broken, or is the outline not useable anymore ?
Did you check if an issue was already open on fzf.vim ?
Will try to see if we can catch this on coc-fzf side easily. Might need a testcase, will let you know.
In such files outline is not usable any more. It prints the mentioned error message and then nothing shows up.
Actually the generated fzf command looks a bit off. Usually it should be something like fzf --multi --expect=ctrl-v,ctrl-x,ctrl-t --ansi --prompt=Coc Outline> --layout=reverse-list --preview-window down:65%:wrap:+{-2}-5 --preview '/home/frederick/.vim/plugged/fzf.vim/bin/preview.sh' /home/frederick/Programming/Java/bikedriving/src/main/java/com/frederick/bikedriving/BikeDrivingApplication.java:{-2} --bind ?:toggle-preview --delimiter=: --no-height --border=rounded
. It appears to me that some special character escaping is not handled correctly somewhere... I'll also dig deeper if I get a chance.
Hmm... actually it's not 'virtual' files that broke it, but :
in the buffer name.
I just tried moving a random Python project into /tmp/foo:bar
and outline stopped working on all regular files.
Update Another simple example: nvim https://www.google.com/index.html
then try opening outline.
@Frederick888 I fixed it by removing the preview for files featuring a colon.
Thanks for reporting this issue 😉
@totocaca69 Is this because fzf uses colon as option delimiter? Any workarounds to make previews work in such cases? 😅
Here is the script that fzf.vim
uses for preview: https://github.com/junegunn/fzf.vim/blob/master/bin/preview.sh
It relies on the :
, there is no way around it 😞
But we could maybe create a temp file without the :
.
I might try it today, no guarantee though.
@Frederick888 done ! Please update and let me know if this works for you.
@totocaca69 Yup it worked flawlessly! Thanks a ton for working on this :)
Environment
echo $FZF_DEFAULT_OPTS
: (empty)echo $FZF_DEFAULT_COMMAND
:fd --type f --hidden --follow --exclude .git
bat --version
: 0.18.2(n)vim --version
:Features: +acl +iconv +tui See ":help feature-compile"
system vimrc file: "$VIM/sysinit.vim" fall-back for $VIM: "/usr/local/Cellar/neovim/0.5.0/share/nvim"
Run :checkhealth for more info
Error running 'fzf' '--multi' '--expect=ctrl-v,ctrl-x,ctrl-t' '--ansi' '--prompt=Coc Outline> ' '--layout=reverse-list' '--preview-window' 'down:65%:wrap:+//contents/spring-webmvc-4.3.8.RELEASE.jar/org.springframework.web.servlet.config.annotation...=/mav en.scope=/compile=/%3Corg.springframework.web.servlet.config.annotation(WebMvcConfigurerAdapter.class:{-2}' '--bind' '?:toggle-preview' '--delimiter=:' --no-height --border=rounded > /var/folders/k7/yr15b9rs2mb68vyz3_s7_n100000gq/T/nvimlxAA75/5