diffchar.vim
diffchar.vim copied to clipboard
use cursor hl group for corresponding diff in terminal vim also
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.
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?