diff --git a/autoload/brightest.vim b/autoload/brightest.vim index 8cce8c3..de257e0 100644 --- a/autoload/brightest.vim +++ b/autoload/brightest.vim @@ -72,6 +72,10 @@ endfunction let s:old_enable_window_all = g:brightest#enable_highlight_all_window function! brightest#hl_clear() + if empty(s:Highlight.hl_list()) + return + endif +" call s:Highlight.as_windo().disable_all() if g:brightest#enable_highlight_all_window \ || s:old_enable_window_all call s:Highlight.as_windo().disable_all() @@ -262,6 +266,7 @@ function! s:is_enable_on_cursorhold() return g:brightest#enable_on_CursorHold && get(b:, "brightest_enable_on_CursorHold", 1) endfunction + function! brightest#on_CursorHold() if s:is_enable() && s:is_enable_on_cursorhold() call brightest#highlighting()