mirror of
https://github.com/osyo-manga/vim-brightest.git
synced 2025-11-10 20:43:54 -05:00
Improve #13.
This commit is contained in:
@@ -275,13 +275,23 @@ endfunction
|
||||
|
||||
|
||||
let g:brightest#enable_clear_highlight_on_CursorMoved = get(g:, "brightest#enable_clear_highlight_on_CursorMoved", 1)
|
||||
|
||||
function! brightest#on_CursorMoved()
|
||||
let mode = mode()
|
||||
|
||||
if s:is_enable_on_cursorhold() && g:brightest#enable_clear_highlight_on_CursorMoved
|
||||
call brightest#hl_clear()
|
||||
endif
|
||||
if s:is_enable() && !s:is_enable_on_cursorhold()
|
||||
call brightest#highlighting()
|
||||
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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user