Skip to content

Commit

Permalink
Revert "deprecate hls cursor functions"
Browse files Browse the repository at this point in the history
This reverts commit 6de3dc3.
  • Loading branch information
morhetz committed Sep 4, 2015
1 parent 13f52ab commit 6f10f00
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
22 changes: 22 additions & 0 deletions autoload/gruvbox.vim
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,26 @@ function! gruvbox#invert_signs_toggle()
colorscheme gruvbox
endfunction

" Search Highlighting {{{

function! gruvbox#hls_show()
set hlsearch
call GruvboxHlsShowCursor()
endfunction

function! gruvbox#hls_hide()
set nohlsearch
call GruvboxHlsHideCursor()
endfunction

function! gruvbox#hls_toggle()
if &hlsearch
call gruvbox#hls_hide()
else
call gruvbox#hls_show()
endif
endfunction

" }}}

" vim: set sw=2 ts=2 sts=2 et tw=80 ft=vim fdm=marker:
10 changes: 8 additions & 2 deletions colors/gruvbox.vim
Original file line number Diff line number Diff line change
Expand Up @@ -1182,11 +1182,17 @@ call s:HL('jsonString', s:fg1)
" Search Highlighting Cursor {{{

function! GruvboxHlsShowCursor()
echo 'GruvboxHlsShowCursor is deprecated'
call s:HL('Cursor', s:bg0, s:hls_cursor)
call s:HL('vCursor', s:bg0, s:hls_cursor)
call s:HL('iCursor', s:bg0, s:hls_cursor)
call s:HL('lCursor', s:bg0, s:hls_cursor)
endfunction

function! GruvboxHlsHideCursor()
echo 'GruvboxHlsHideCursor is deprecated'
call s:HL('Cursor', 'NONE', 'NONE', s:inverse)
call s:HL('vCursor', 'NONE', 'NONE', s:inverse)
call s:HL('iCursor', 'NONE', 'NONE', s:inverse)
call s:HL('lCursor', 'NONE', 'NONE', s:inverse)
endfunction

" }}}
Expand Down

0 comments on commit 6f10f00

Please sign in to comment.