Merge branch 'loclist_count'
This commit is contained in:
commit
9e0e7e085e
@ -64,6 +64,12 @@ if !exists("g:syntastic_full_redraws")
|
|||||||
let g:syntastic_full_redraws = !( has('gui_running') || has('gui_macvim'))
|
let g:syntastic_full_redraws = !( has('gui_running') || has('gui_macvim'))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
" TODO: not documented
|
||||||
|
if !exists("g:syntastic_reuse_loc_lists")
|
||||||
|
" a relevant bug has been fixed in one of the pre-releases of Vim 7.4
|
||||||
|
let g:syntastic_reuse_loc_lists = (v:version >= 704)
|
||||||
|
endif
|
||||||
|
|
||||||
let s:registry = g:SyntasticRegistry.Instance()
|
let s:registry = g:SyntasticRegistry.Instance()
|
||||||
let s:notifiers = g:SyntasticNotifiers.Instance()
|
let s:notifiers = g:SyntasticNotifiers.Instance()
|
||||||
let s:modemap = g:SyntasticModeMap.Instance()
|
let s:modemap = g:SyntasticModeMap.Instance()
|
||||||
@ -145,8 +151,10 @@ function! s:UpdateErrors(auto_invoked, ...)
|
|||||||
|
|
||||||
let loclist = g:SyntasticLoclist.current()
|
let loclist = g:SyntasticLoclist.current()
|
||||||
|
|
||||||
|
let w:syntastic_loclist_set = 0
|
||||||
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())
|
||||||
|
let w:syntastic_loclist_set = 1
|
||||||
if run_checks && g:syntastic_auto_jump && loclist.hasErrorsOrWarningsToDisplay()
|
if run_checks && g:syntastic_auto_jump && loclist.hasErrorsOrWarningsToDisplay()
|
||||||
silent! lrewind
|
silent! lrewind
|
||||||
endif
|
endif
|
||||||
@ -356,7 +364,6 @@ endfunction
|
|||||||
function! SyntasticMake(options)
|
function! SyntasticMake(options)
|
||||||
call syntastic#util#debug('SyntasticMake: called with options: '. string(a:options))
|
call syntastic#util#debug('SyntasticMake: called with options: '. string(a:options))
|
||||||
|
|
||||||
let old_loclist = getloclist(0)
|
|
||||||
let old_shell = &shell
|
let old_shell = &shell
|
||||||
let old_shellredir = &shellredir
|
let old_shellredir = &shellredir
|
||||||
let old_errorformat = &errorformat
|
let old_errorformat = &errorformat
|
||||||
@ -390,13 +397,13 @@ function! SyntasticMake(options)
|
|||||||
endif
|
endif
|
||||||
lgetexpr err_lines
|
lgetexpr err_lines
|
||||||
|
|
||||||
let errors = getloclist(0)
|
let errors = copy(getloclist(0))
|
||||||
|
|
||||||
if has_key(a:options, 'cwd')
|
if has_key(a:options, 'cwd')
|
||||||
exec 'lcd ' . fnameescape(old_cwd)
|
exec 'lcd ' . fnameescape(old_cwd)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
call setloclist(0, old_loclist)
|
silent! lolder
|
||||||
let &errorformat = old_errorformat
|
let &errorformat = old_errorformat
|
||||||
let &shellredir = old_shellredir
|
let &shellredir = old_shellredir
|
||||||
let &shell=old_shell
|
let &shell=old_shell
|
||||||
|
@ -143,7 +143,12 @@ endfunction
|
|||||||
|
|
||||||
"display the cached errors for this buf in the location list
|
"display the cached errors for this buf in the location list
|
||||||
function! g:SyntasticLoclist.show()
|
function! g:SyntasticLoclist.show()
|
||||||
call setloclist(0, self.filteredRaw())
|
if !exists('w:syntastic_loclist_set')
|
||||||
|
let w:syntastic_loclist_set = 0
|
||||||
|
endif
|
||||||
|
call setloclist(0, self.filteredRaw(), g:syntastic_reuse_loc_lists && w:syntastic_loclist_set ? 'r' : ' ')
|
||||||
|
let w:syntastic_loclist_set = 1
|
||||||
|
|
||||||
if self.hasErrorsOrWarningsToDisplay()
|
if self.hasErrorsOrWarningsToDisplay()
|
||||||
let num = winnr()
|
let num = winnr()
|
||||||
exec "lopen " . g:syntastic_loc_list_height
|
exec "lopen " . g:syntastic_loc_list_height
|
||||||
|
Loading…
x
Reference in New Issue
Block a user