ClapPreview is linked to FloatBorder which causes issue when re-applying colorscheme
sscherfke opened this issue · 1 comments
Environment (please complete the following information):
- OS: any
- (Neo)Vim version: 0.7+
- vim-clap version: latest git
- Have you reproduced with a minimal vimrc: yes
- Have you updated to the latest plugin version: yes
- Have you upgraded to/compiled the latest Rust binary: yes
Describe the bug
When you start vim and open Clap for the first time, the brew window contents and the preview window border have the same background color.
When you select a different colorscheme or reload the current color scheme and open Clap again, the preview window border has a different background color than the preveiw window contents.
The preview window border looks the same as the VertSplit (see screenshot)
Clap debug
To Reproduce
Steps to reproduce the behavior:
- Create the minimal vimrc
min.vim
:
set nocompatible
set runtimepath^=/path/to/vim-clap
syntax on
filetype plugin indent on
-
Start (neo)vim with command:
vim -u min.vim
-
Type
:Clap commits
-> ClapPreview border has the same bg color as the preview window contents -
Ctrl+C
-
Type
:colorscheme delek
(or any other) -
Type
:Clap commits
-> ClapPreview border has wrong color compared to preview window contents
Expected behavior
Preview window border keeps correct color
Additional context
The reason for this is that ClapPreview
is linked to FloatBorder
which is in turn linked to VertSplit
:
autoload/clap/themes.vim
196: hi default link FloatBorder ClapPreview
A workaround is explicitly setting a highlight for FloatBorder
that has the same bg as ClapPreview
.
Thank you very much. Works as expected now. ❤️