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

Background color not set correctly #325

Closed
6 tasks
ghost opened this issue Feb 27, 2017 · 6 comments
Closed
6 tasks

Background color not set correctly #325

ghost opened this issue Feb 27, 2017 · 6 comments

Comments

@ghost
Copy link

ghost commented Feb 27, 2017

  • Category
    • Question
    • [ x] Bug
    • Suggestion
  • OS
    • [x ] Linux
    • macOS
    • Windows
    • Etc.
  • Vim
    • [x ] Vim
    • Neovim

With fzf :Tags, I notice this problem when there are only a few search results which does not fill the fzf split window height.
image

When there are enough entries, the problem is only seen at the borders.
image

@junegunn
Copy link
Owner

Do you have the same issue outside of Vim?

@ghost
Copy link
Author

ghost commented Feb 28, 2017

No. This is only within vim, and only when used together with fzf.
I also checked similar issue described by https://sunaku.github.io/vim-256color-bce.html.
I have also tried setting "set t_ut=" as described in the above page. Still the problem is present.

@junegunn
Copy link
Owner

junegunn commented Mar 1, 2017

Do you have g:fzf_colors set?

@ghost
Copy link
Author

ghost commented Mar 1, 2017

Thank you...that solved it !!

let g:fzf_colors =
\ { 'fg': ['fg', 'Normal'],
\ 'bg': ['bg', 'Normal']}

@ghost ghost closed this as completed Mar 1, 2017
@junegunn
Copy link
Owner

junegunn commented Mar 1, 2017

Actually I was not suggesting that you should have the option set up. fzf should display correctly regardless of it.

I found out what's happening.

  • Your vim color scheme has a different background color than your terminal.
  • fzf does not clear the whole screen, when background color is not set.

I'll see what I can do.

junegunn added a commit to junegunn/fzf that referenced this issue Mar 1, 2017
This is needed when fzf is started from inside a program (e.g. Vim)
and it uses a different background color than the terminal.

- junegunn/fzf.vim#325
- junegunn/fzf.vim#300
@ghost
Copy link
Author

ghost commented Mar 1, 2017

Thanks for the fix!

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant