Make the enabled() method optional.
This commit is contained in:
parent
0248a848d3
commit
4e32123b53
@ -16,10 +16,6 @@ function! g:SyntasticAutoloclistNotifier.New()
|
|||||||
return newObj
|
return newObj
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! g:SyntasticAutoloclistNotifier.enabled()
|
|
||||||
return 1
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! g:SyntasticAutoloclistNotifier.refresh(loclist)
|
function! g:SyntasticAutoloclistNotifier.refresh(loclist)
|
||||||
call g:SyntasticAutoloclistNotifier.AutoToggle(a:loclist)
|
call g:SyntasticAutoloclistNotifier.AutoToggle(a:loclist)
|
||||||
endfunction
|
endfunction
|
||||||
|
@ -17,10 +17,6 @@ function! g:SyntasticCursorNotifier.New()
|
|||||||
return newObj
|
return newObj
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! g:SyntasticCursorNotifier.enabled()
|
|
||||||
return 1
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! g:SyntasticCursorNotifier.refresh(loclist)
|
function! g:SyntasticCursorNotifier.refresh(loclist)
|
||||||
autocmd! syntastic CursorMoved
|
autocmd! syntastic CursorMoved
|
||||||
let enabled = exists('b:syntastic_echo_current_error') ? b:syntastic_echo_current_error : g:syntastic_echo_current_error
|
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)
|
function! g:SyntasticNotifiers.refresh(loclist)
|
||||||
for type in self._enabled_types
|
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)
|
call self._notifier[type].refresh(a:loclist)
|
||||||
endif
|
endif
|
||||||
endfor
|
endfor
|
||||||
|
Loading…
Reference in New Issue
Block a user