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

use cursor hl group for corresponding diff in terminal vim also #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jwhite510
Copy link

The documentations states:
While showing the exact differences, when the cursor is moved on a difference unit, you can see its corresponding unit with |hl-Cursor| in another window, based on a |g:DiffPairVisible|. If you change its default, the corresponding unit is echoed in the command line or displayed in a popup/floating window just below the cursor position or at the mouse position.
I am using terminal neovim, and after reading the documentation was changing Cursor highlight group to set the color of the corresponding difference, but it doesnt change anything. It seems that this is only the case if running GUI vim.

\'GUIColors': has('gui_running') || \has('termguicolors') && &termguicolors,

If not, the hl group defaults to VertSplit hl group, but there is no mention of Vertsplit hl group in the documentation. It seems to me that the hl group should be Cursor regardless of whether gui vim is used.

@rickhowe
Copy link
Owner

Thanks.
'Cursor' is not always available. For example, 'default' color scheme clears 'Cursor' in vim 8.2 (not gvim). That is why I need an alternative, like 'VertSplit'.
My neovim has termguicolors so 'Cursor' is used in diffchar. When 'delek' color scheme is used, it works fine, but in case of 'default' color scheme, it seems does not work, which I found now :-(. I am not sure why. In your case, 'VertSplit' is used? If you change it to 'Cursor', it works fine for 'default' color scheme?

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

Successfully merging this pull request may close these issues.

2 participants