From 41dbb2ba277e98eece6ee992133a0d259ec18da6 Mon Sep 17 00:00:00 2001 From: manga_osyo Date: Thu, 31 Jul 2014 12:58:48 +0900 Subject: [PATCH] Fix function name. --- autoload/brightest.vim | 36 ++++++++++++++++++------------------ plugin/brightest.vim | 2 +- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/autoload/brightest.vim b/autoload/brightest.vim index cecf387..0f4f044 100644 --- a/autoload/brightest.vim +++ b/autoload/brightest.vim @@ -77,6 +77,23 @@ endfunction " call s:Highlight.highlight("current_word", a:current_group, current, -1) " 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", '') @@ -102,24 +119,7 @@ function! s:highlight_in_cursorline() 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 - - - -function! brightest#highlight() +function! brightest#highlighting() call s:highlighting( \ get(b:, "brightest_pattern", g:brightest#pattern), \ s:default(), diff --git a/plugin/brightest.vim b/plugin/brightest.vim index aedb528..6b99c1e 100644 --- a/plugin/brightest.vim +++ b/plugin/brightest.vim @@ -22,7 +22,7 @@ command! -bar BrightestDisable let g:brightest_enable = 0 | call brightest#hl_cl augroup brightest autocmd! - autocmd CursorMoved * call brightest#highlight() + autocmd CursorMoved * call brightest#highlighting() autocmd BufLeave,WinLeave,InsertEnter * call brightest#hl_clear() autocmd ColorScheme * call s:init_hl() augroup END