mirror of
https://github.com/osyo-manga/vim-brightest.git
synced 2025-11-11 13:03:51 -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)
|
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
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user