This commit is contained in:
manga_osyo
2015-04-19 13:29:20 +09:00
parent 3beb01abd9
commit 4ed3a70cfe

View File

@@ -275,13 +275,23 @@ endfunction
let g:brightest#enable_clear_highlight_on_CursorMoved = get(g:, "brightest#enable_clear_highlight_on_CursorMoved", 1) let g:brightest#enable_clear_highlight_on_CursorMoved = get(g:, "brightest#enable_clear_highlight_on_CursorMoved", 1)
function! brightest#on_CursorMoved() function! brightest#on_CursorMoved()
let mode = mode()
if s:is_enable_on_cursorhold() && g:brightest#enable_clear_highlight_on_CursorMoved if s:is_enable_on_cursorhold() && g:brightest#enable_clear_highlight_on_CursorMoved
call brightest#hl_clear() call brightest#hl_clear()
endif endif
if s:is_enable() && !s:is_enable_on_cursorhold() if s:is_enable() && !s:is_enable_on_cursorhold()
call brightest#highlighting() call brightest#highlighting()
endif endif
" Workaround : visual mode to normal mode
" https://github.com/osyo-manga/vim-brightest/issues/13
if mode =~# "[\<C-v>vV]" && mode != mode()
\ && g:brightest#enable_highlight_all_window
normal! gv
endif
endfunction endfunction