Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Garbled view when using FZF with additional qf formatter plugin #56

Closed
ajitid opened this issue Feb 21, 2022 · 14 comments
Closed

Garbled view when using FZF with additional qf formatter plugin #56

ajitid opened this issue Feb 21, 2022 · 14 comments
Labels
bug Something isn't working

Comments

@ajitid
Copy link
Contributor

ajitid commented Feb 21, 2022

Neovim version (nvim -v | head -n1)

NVIM v0.7.0-dev+1109-gfaeff49cb

Operating system/version

Ubuntu 21.04 on WSL2

How to reproduce the issue

  1. Install https://gitlab.com/yorickpeterse/nvim-pqf
  2. Put items in quick fix list

image

  1. Now open fzf using zf keybinding

Expected behavior

Text in FZF list should be same as what we see in quick fix list

Actual behavior

Garbled text is being seen (notice many {m, [m and numbers across the list)

image

This, as you previously mentioned, could be related to concealing.

@ajitid ajitid added the bug Something isn't working label Feb 21, 2022
@kevinhwang91
Copy link
Owner

The reason is nvim-pqf using conceal to hide {}<> chars. The items as a source for fzf is not supported conceal for now, I will try to fix if I have times.

@kevinhwang91
Copy link
Owner

Please try dev branch.

@ajitid
Copy link
Contributor Author

ajitid commented Feb 21, 2022

I can still see those messy characters. Here's the output:

image

@kevinhwang91
Copy link
Owner

kevinhwang91 commented Feb 21, 2022

Make sure you have changed the dev branch and updated the code. I have tested under clean ENV with docker is fine, only load nvim-bqf, fzf and nvim-pqf.git.
image

@ajitid
Copy link
Contributor Author

ajitid commented Feb 21, 2022

What docker image did you use?

@kevinhwang91
Copy link
Owner

anatolelucet/neovim:0.6.0

@ajitid
Copy link
Contributor Author

ajitid commented Feb 21, 2022

Can confirm bqf dev branch works fine w/ standalone image, it must be something in my config. Thanks for resolving it!

@kevinhwang91
Copy link
Owner

Waiting for your solution, maybe some potential bugs I haven't thought about.

@ajitid
Copy link
Contributor Author

ajitid commented Feb 21, 2022

@kevinhwang91 so I removed all other plugins, even removed the whole config, updated fzf, updated neovim — but I still couldn't reproduce the right behavaior on my machine, Guess I'll have to adjust to it 🤷‍♂️

@kevinhwang91
Copy link
Owner

kevinhwang91 commented Feb 21, 2022

I also can't reproduce the screenshot you provided. main branch only with the issue for extra {, I think you should check out the fzf and your terminal ansi escape code.
image

FYI: you can debug bqf by yourself if you want.

  1. tail -f ~/.cache/nvim/bqf.log
  2. Add log.warn(processed_line) under */nvim-bqf/lua/bqf/filter/fzf.lua:172
  3. BQF_LOG=warn nvim and reproduce the issue and get the log.

@ajitid
Copy link
Contributor Author

ajitid commented Feb 21, 2022

So the culprit was my default shell, Fish. I did chsh and switched to bash and now it works fine.

image

Oddly, when I switched to fish from bash, it worked too. I have dozens of stuff configured in Fish, it could be one of startup settings

kevinhwang91 added a commit that referenced this issue Feb 21, 2022
quickfixtextfunc may use conceal
@kevinhwang91
Copy link
Owner

Thanks for your feedback, I have merged the patch.

wodesuck added a commit to wodesuck/fzf that referenced this issue May 22, 2022
`shellescape()` behaviour different when `shell=fish`, so we should set `shell` before calling `shellescape()`, otherwise some wired behaviour (such as kevinhwang91/nvim-bqf#56) may apper.
@wodesuck
Copy link

@ajitid I found that should be a bug of fzf, and I fix it in junegunn/fzf#2828

@ajitid
Copy link
Contributor Author

ajitid commented May 22, 2022

Oh, thank you so much @wodesuck!

junegunn added a commit to junegunn/fzf that referenced this issue May 25, 2022
`shellescape()` behavior is different when `shell=fish`, so we should set `shell` before calling `shellescape()`, otherwise an unexpected result may occur (e.g. kevinhwang91/nvim-bqf#56).

Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants