Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Open
jwhite510 wants to merge 1 commit intorickhowe:master from
jwhite510:master
Open

use cursor hl group for corresponding diff in terminal vim also #23
jwhite510 wants to merge 1 commit intorickhowe:master from
jwhite510:master

Conversation

@jwhite510
Copy link

@jwhite510 jwhite510 commented Sep 22, 2020

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.

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

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /