You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.1 KiB
VimL
41 lines
1.1 KiB
VimL
if exists("g:loaded_syntastic_notifier_autoloclist")
|
|
finish
|
|
endif
|
|
let g:loaded_syntastic_notifier_autoloclist = 1
|
|
|
|
if !exists("g:syntastic_auto_loc_list")
|
|
let g:syntastic_auto_loc_list = 2
|
|
endif
|
|
|
|
let g:SyntasticAutoloclistNotifier = {}
|
|
|
|
" Public methods {{{1
|
|
"
|
|
function! g:SyntasticAutoloclistNotifier.New()
|
|
let newObj = copy(self)
|
|
return newObj
|
|
endfunction
|
|
|
|
function! g:SyntasticAutoloclistNotifier.refresh(loclist)
|
|
call syntastic#log#debug(g:SyntasticDebugNotifications, 'autoloclist: refresh')
|
|
call g:SyntasticAutoloclistNotifier.AutoToggle(a:loclist)
|
|
endfunction
|
|
|
|
function! g:SyntasticAutoloclistNotifier.AutoToggle(loclist)
|
|
call syntastic#log#debug(g:SyntasticDebugNotifications, 'autoloclist: toggle')
|
|
if !a:loclist.isEmpty()
|
|
if g:syntastic_auto_loc_list == 1
|
|
call a:loclist.show()
|
|
endif
|
|
else
|
|
if g:syntastic_auto_loc_list > 0
|
|
|
|
"TODO: this will close the loc list window if one was opened by
|
|
"something other than syntastic
|
|
lclose
|
|
endif
|
|
endif
|
|
endfunction
|
|
|
|
" vim: set sw=4 sts=4 et fdm=marker:
|