Skip to content

Commit 6f10f00

Browse files
committed
Revert "deprecate hls cursor functions"
This reverts commit 6de3dc3.
1 parent 13f52ab commit 6f10f00

File tree

2 files changed

+30
-2
lines changed

2 files changed

+30
-2
lines changed

autoload/gruvbox.vim

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,26 @@ function! gruvbox#invert_signs_toggle()
1616
colorscheme gruvbox
1717
endfunction
1818

19+
" Search Highlighting {{{
20+
21+
function! gruvbox#hls_show()
22+
set hlsearch
23+
call GruvboxHlsShowCursor()
24+
endfunction
25+
26+
function! gruvbox#hls_hide()
27+
set nohlsearch
28+
call GruvboxHlsHideCursor()
29+
endfunction
30+
31+
function! gruvbox#hls_toggle()
32+
if &hlsearch
33+
call gruvbox#hls_hide()
34+
else
35+
call gruvbox#hls_show()
36+
endif
37+
endfunction
38+
39+
" }}}
40+
1941
" vim: set sw=2 ts=2 sts=2 et tw=80 ft=vim fdm=marker:

colors/gruvbox.vim

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1182,11 +1182,17 @@ call s:HL('jsonString', s:fg1)
11821182
" Search Highlighting Cursor {{{
11831183

11841184
function! GruvboxHlsShowCursor()
1185-
echo 'GruvboxHlsShowCursor is deprecated'
1185+
call s:HL('Cursor', s:bg0, s:hls_cursor)
1186+
call s:HL('vCursor', s:bg0, s:hls_cursor)
1187+
call s:HL('iCursor', s:bg0, s:hls_cursor)
1188+
call s:HL('lCursor', s:bg0, s:hls_cursor)
11861189
endfunction
11871190

11881191
function! GruvboxHlsHideCursor()
1189-
echo 'GruvboxHlsHideCursor is deprecated'
1192+
call s:HL('Cursor', 'NONE', 'NONE', s:inverse)
1193+
call s:HL('vCursor', 'NONE', 'NONE', s:inverse)
1194+
call s:HL('iCursor', 'NONE', 'NONE', s:inverse)
1195+
call s:HL('lCursor', 'NONE', 'NONE', s:inverse)
11901196
endfunction
11911197

11921198
" }}}

0 commit comments

Comments
 (0)