File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
autoload/vital/_easymotion/HitAHint Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ let s:overwin = {
6969\ ' highlight' : {
7070\ ' shade' : ' HitAHintShade' ,
7171\ ' target' : ' HitAHintTarget' ,
72+ \ ' cursor' : ' HitAHintCursor' ,
7273\ },
7374\ ' jump_first_target_keys' : [],
7475\ ' do_shade' : s: TRUE ,
@@ -78,6 +79,16 @@ let s:overwin = {
7879function ! s: _init_hl () abort
7980 highlight default HitAHintShade ctermfg= 242 guifg= #777777
8081 highlight default HitAHintTarget ctermfg= 81 guifg= #66 D9EF
82+ " Cursor highlight doesn't exist for some environment with some
83+ " colorscheme ref:#275
84+ " e.g.
85+ " - :colorscheme default
86+ " - :colorscheme hybrid
87+ if hlexists (' Cursor' )
88+ highlight default link HitAHintCursor Cursor
89+ else
90+ highlight default HitAHintCursor term = reverse cterm= reverse gui = reverse
91+ endif
8192endfunction
8293
8394call s: _init_hl ()
@@ -287,7 +298,7 @@ function! s:Hinter.init(hint_dict) abort
287298endfunction
288299
289300function ! s: Hinter .before () abort
290- let self .highlight_id_cursor = matchadd (' Cursor ' , ' \%#' , 101 )
301+ let self .highlight_id_cursor = matchadd (self .config. highlight . cursor , ' \%#' , 101 )
291302 call self .save_options ()
292303 call self .disable_conceal_in_other_win ()
293304endfunction
You can’t perform that action at this time.
0 commit comments