Sets the status line of the location window.
Shows the command used to produce the error list on the status line of the location window. Also fixed a (harmless) refresh bug.
This commit is contained in:
parent
c1de9703ff
commit
4c888855d6
@ -135,7 +135,6 @@ function! s:UpdateErrors(auto_invoked, ...)
|
|||||||
end
|
end
|
||||||
|
|
||||||
let loclist = g:SyntasticLoclist.current()
|
let loclist = g:SyntasticLoclist.current()
|
||||||
call s:notifiers.refresh(loclist)
|
|
||||||
|
|
||||||
if g:syntastic_always_populate_loc_list || g:syntastic_auto_jump
|
if g:syntastic_always_populate_loc_list || g:syntastic_auto_jump
|
||||||
call setloclist(0, loclist.filteredRaw())
|
call setloclist(0, loclist.filteredRaw())
|
||||||
@ -143,6 +142,8 @@ function! s:UpdateErrors(auto_invoked, ...)
|
|||||||
silent! lrewind
|
silent! lrewind
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
call s:notifiers.refresh(loclist)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
"clear the loc list for the buffer
|
"clear the loc list for the buffer
|
||||||
@ -178,6 +179,7 @@ function! s:CacheErrors(...)
|
|||||||
|
|
||||||
if !loclist.isEmpty()
|
if !loclist.isEmpty()
|
||||||
let newLoclist = newLoclist.extend(loclist)
|
let newLoclist = newLoclist.extend(loclist)
|
||||||
|
call newLoclist.setName(checker.getName())
|
||||||
|
|
||||||
"only get errors from one checker at a time
|
"only get errors from one checker at a time
|
||||||
break
|
break
|
||||||
|
@ -23,6 +23,8 @@ function! g:SyntasticLoclist.New(rawLoclist)
|
|||||||
let newObj._rawLoclist = llist
|
let newObj._rawLoclist = llist
|
||||||
let newObj._hasErrorsOrWarningsToDisplay = -1
|
let newObj._hasErrorsOrWarningsToDisplay = -1
|
||||||
|
|
||||||
|
let newObj._name = ''
|
||||||
|
|
||||||
return newObj
|
return newObj
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
@ -59,6 +61,14 @@ function! g:SyntasticLoclist.getLength()
|
|||||||
return len(self._rawLoclist)
|
return len(self._rawLoclist)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
function! g:SyntasticLoclist.getName()
|
||||||
|
return len(self._name)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! g:SyntasticLoclist.setName(name)
|
||||||
|
let self._name = a:name
|
||||||
|
endfunction
|
||||||
|
|
||||||
function! g:SyntasticLoclist.hasErrorsOrWarningsToDisplay()
|
function! g:SyntasticLoclist.hasErrorsOrWarningsToDisplay()
|
||||||
if self._hasErrorsOrWarningsToDisplay >= 0
|
if self._hasErrorsOrWarningsToDisplay >= 0
|
||||||
return self._hasErrorsOrWarningsToDisplay
|
return self._hasErrorsOrWarningsToDisplay
|
||||||
@ -140,6 +150,17 @@ function! g:SyntasticLoclist.show()
|
|||||||
if num != winnr()
|
if num != winnr()
|
||||||
wincmd p
|
wincmd p
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
" try to find the loclist window and set w:quickfix_title
|
||||||
|
for buf in tabpagebuflist()
|
||||||
|
if buflisted(buf) && bufloaded(buf) && getbufvar(buf, '&buftype') ==# 'quickfix'
|
||||||
|
let win = bufwinnr(buf)
|
||||||
|
let title = getwinvar(win, 'quickfix_title', '')
|
||||||
|
if title ==# ':setloclist()' || strpart(title, 0, 16) ==# ':SyntasticCheck '
|
||||||
|
call setwinvar(win, 'quickfix_title', ':SyntasticCheck ' . self._name)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user