Make the enabled() method optional.
This commit is contained in:
parent
0248a848d3
commit
4e32123b53
@ -16,10 +16,6 @@ function! g:SyntasticAutoloclistNotifier.New()
|
||||
return newObj
|
||||
endfunction
|
||||
|
||||
function! g:SyntasticAutoloclistNotifier.enabled()
|
||||
return 1
|
||||
endfunction
|
||||
|
||||
function! g:SyntasticAutoloclistNotifier.refresh(loclist)
|
||||
call g:SyntasticAutoloclistNotifier.AutoToggle(a:loclist)
|
||||
endfunction
|
||||
|
@ -17,10 +17,6 @@ function! g:SyntasticCursorNotifier.New()
|
||||
return newObj
|
||||
endfunction
|
||||
|
||||
function! g:SyntasticCursorNotifier.enabled()
|
||||
return 1
|
||||
endfunction
|
||||
|
||||
function! g:SyntasticCursorNotifier.refresh(loclist)
|
||||
autocmd! syntastic CursorMoved
|
||||
let enabled = exists('b:syntastic_echo_current_error') ? b:syntastic_echo_current_error : g:syntastic_echo_current_error
|
||||
|
@ -25,7 +25,8 @@ endfunction
|
||||
|
||||
function! g:SyntasticNotifiers.refresh(loclist)
|
||||
for type in self._enabled_types
|
||||
if self._notifier[type].enabled()
|
||||
let class = substitute(type, '.*', 'Syntastic\u&Notifier', '')
|
||||
if !has_key(g:{class}, 'enabled') || self._notifier[type].enabled()
|
||||
call self._notifier[type].refresh(a:loclist)
|
||||
endif
|
||||
endfor
|
||||
|
Loading…
Reference in New Issue
Block a user