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

Different selection colors in fvim #82

Closed
Kethku opened this issue Oct 1, 2019 · 14 comments
Closed

Different selection colors in fvim #82

Kethku opened this issue Oct 1, 2019 · 14 comments

Comments

@Kethku
Copy link

Kethku commented Oct 1, 2019

In nvim qt and terminal nvim, selection colors are set by the color scheme.

image

In fvim however they appear to be default or something similar

image

@yatli
Copy link
Owner

yatli commented Oct 1, 2019

Noted.

Looks like a reverse color calculation error.

@Kethku
Copy link
Author

Kethku commented Oct 1, 2019

Actually I think neovim doesn't use reverse colors to highlight. As you can see the background for the highlight changes based on the thing highlighted. Maybe I'm misunderstanding your comment, but I believe highlighting in vim is more complicated than a reverse color calculation.

@yatli
Copy link
Owner

yatli commented Oct 5, 2019

@Kethku looking at your screenshot I believe what nvim-qt does is to simply swap fg and bg.

Note that in your screenshot the foreground color stays the same (which appears to be the default bg).

This is different from what I understand from the highlight color docs, but if this is the de facto behavior we can implement that.

edit: for clarity, it depends on the color scheme whether highlight is done by color reversing, or a new highlight group. gruvbox uses reverse colors.

@yatli
Copy link
Owner

yatli commented Oct 5, 2019

the reverse color calculation is really off.. see 48b42e8

@yatli
Copy link
Owner

yatli commented Oct 5, 2019

hmm, looks like nvim-gtk also implement the swapping scheme.
edit:

reverse:		reverse video. Foreground and background colors are
			switched.

looks like I have misunderstood the docs. The other frontends are implementing it correctly!

@yatli yatli closed this as completed in e81f09a Oct 5, 2019
@yatli
Copy link
Owner

yatli commented Oct 5, 2019

pushed out a new release (0.2-132)

@Kethku
Copy link
Author

Kethku commented Oct 5, 2019

I don't think this is the correct fix. It appears that gruvbox itself is manually setting the selection colors. See this issue: morhetz/gruvbox#167

@Kethku
Copy link
Author

Kethku commented Oct 5, 2019

Also note: in a compatible terminal, the colors do the same thing which says to me either the docs or wrong since they don't match the reference implementation or maybe the docs are just confusing

@Kethku
Copy link
Author

Kethku commented Oct 5, 2019

I will try to spend some time to find more information. Thank you for your effort

@yatli
Copy link
Owner

yatli commented Oct 5, 2019

with let g:gruvbox_invert_selection=0 before setting the colorscheme:

image

check your settings :)

@Kethku
Copy link
Author

Kethku commented Oct 5, 2019

Fair, but given the change between fvim and terminal nvim/nvimqt, doesn't this constitute a bug?

@yatli
Copy link
Owner

yatli commented Oct 5, 2019

the behavior should be identical to other frontends, could you please confirm?

@Kethku
Copy link
Author

Kethku commented Oct 5, 2019 via email

@Kethku
Copy link
Author

Kethku commented Oct 5, 2019

Looks like I missed your #82 (comment) comment! This is working perfectly now. Thank you so much!

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

2 participants