mirror of
https://github.com/osyo-manga/vim-brightest.git
synced 2025-11-11 13:03:51 -05:00
Fix function name.
This commit is contained in:
@@ -77,6 +77,23 @@ endfunction
|
|||||||
" call s:Highlight.highlight("current_word", a:current_group, current, -1)
|
" call s:Highlight.highlight("current_word", a:current_group, current, -1)
|
||||||
" endfunction
|
" endfunction
|
||||||
|
|
||||||
|
|
||||||
|
function! s:highlighting(pattern, highlight, cursorline, ...)
|
||||||
|
call brightest#hl_clear()
|
||||||
|
|
||||||
|
if !s:is_enable_in_current()
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
|
||||||
|
if get(a:, 1, "") == ""
|
||||||
|
return s:single_word(a:pattern, a:highlight, a:cursorline)
|
||||||
|
else
|
||||||
|
" return s:with_current(a:1, a:group, a:pattern)
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
let g:brightest#pattern = get(g:, "brightest#pattern", '')
|
let g:brightest#pattern = get(g:, "brightest#pattern", '')
|
||||||
|
|
||||||
|
|
||||||
@@ -102,24 +119,7 @@ function! s:highlight_in_cursorline()
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
|
function! brightest#highlighting()
|
||||||
function! s:highlighting(pattern, highlight, cursorline, ...)
|
|
||||||
call brightest#hl_clear()
|
|
||||||
|
|
||||||
if !s:is_enable_in_current()
|
|
||||||
return
|
|
||||||
endif
|
|
||||||
|
|
||||||
if get(a:, 1, "") == ""
|
|
||||||
return s:single_word(a:pattern, a:highlight, a:cursorline)
|
|
||||||
else
|
|
||||||
" return s:with_current(a:1, a:group, a:pattern)
|
|
||||||
endif
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function! brightest#highlight()
|
|
||||||
call s:highlighting(
|
call s:highlighting(
|
||||||
\ get(b:, "brightest_pattern", g:brightest#pattern),
|
\ get(b:, "brightest_pattern", g:brightest#pattern),
|
||||||
\ s:default(),
|
\ s:default(),
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ command! -bar BrightestDisable let g:brightest_enable = 0 | call brightest#hl_cl
|
|||||||
|
|
||||||
augroup brightest
|
augroup brightest
|
||||||
autocmd!
|
autocmd!
|
||||||
autocmd CursorMoved * call brightest#highlight()
|
autocmd CursorMoved * call brightest#highlighting()
|
||||||
autocmd BufLeave,WinLeave,InsertEnter * call brightest#hl_clear()
|
autocmd BufLeave,WinLeave,InsertEnter * call brightest#hl_clear()
|
||||||
autocmd ColorScheme * call s:init_hl()
|
autocmd ColorScheme * call s:init_hl()
|
||||||
augroup END
|
augroup END
|
||||||
|
|||||||
Reference in New Issue
Block a user