Bug fix: more auto_loc_list fixes.
This commit is contained in:
parent
8ab26a2268
commit
f4b6c80aef
@ -19,7 +19,7 @@ if has('reltime')
|
||||
lockvar! g:_SYNTASTIC_START
|
||||
endif
|
||||
|
||||
let g:_SYNTASTIC_VERSION = '3.7.0-221'
|
||||
let g:_SYNTASTIC_VERSION = '3.7.0-222'
|
||||
lockvar g:_SYNTASTIC_VERSION
|
||||
|
||||
" Sanity checks {{{1
|
||||
@ -233,14 +233,6 @@ endfunction " }}}2
|
||||
function! SyntasticReset() abort " {{{2
|
||||
call s:ClearCache(bufnr(''))
|
||||
call s:notifiers.refresh(g:SyntasticLoclist.New([]))
|
||||
if !empty(get(w:, 'syntastic_loclist_set', []))
|
||||
try
|
||||
" Vim 7.4.2200 or later
|
||||
call setloclist(0, [], 'r', { 'title': '' })
|
||||
catch /\m^Vim\%((\a\+)\)\=:E\%(118\|731\)/
|
||||
" do nothing
|
||||
endtry
|
||||
endif
|
||||
endfunction " }}}2
|
||||
|
||||
function! SyntasticToggleMode() abort " {{{2
|
||||
|
@ -26,10 +26,26 @@ function! g:SyntasticAutoloclistNotifier.AutoToggle(loclist) abort " {{{2
|
||||
endif
|
||||
else
|
||||
if (auto_loc_list == 1 || auto_loc_list == 2) && !empty(get(w:, 'syntastic_loclist_set', []))
|
||||
"TODO: this will close the loc list window if one was opened by
|
||||
"something other than syntastic
|
||||
call SyntasticLoclistHide()
|
||||
let w:syntastic_loclist_set = []
|
||||
try
|
||||
" Vim 7.4.2200 or later
|
||||
let title = get(getloclist(0, { 'title': 1 }), 'title', ':SyntasticCheck ')
|
||||
catch /\m^Vim\%((\a\+)\)\=:E\%(118\|731\)/
|
||||
let title = ':SyntasticCheck '
|
||||
endtry
|
||||
|
||||
if strpart(title, 0, 16) ==# ':SyntasticCheck '
|
||||
" TODO: this will close the loc list window if one was opened
|
||||
" by something other than syntastic
|
||||
call SyntasticLoclistHide()
|
||||
|
||||
try
|
||||
" Vim 7.4.2200 or later
|
||||
call setloclist(0, [], 'r', { 'title': '' })
|
||||
catch /\m^Vim\%((\a\+)\)\=:E\%(118\|731\)/
|
||||
" do nothing
|
||||
endtry
|
||||
let w:syntastic_loclist_set = []
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endfunction " }}}2
|
||||
|
@ -299,7 +299,7 @@ function! g:SyntasticLoclist.setloclist(new) abort " {{{2
|
||||
call setloclist(0, self.getRaw(), replace ? 'r' : ' ')
|
||||
try
|
||||
" Vim 7.4.2200 or later
|
||||
call setloclist(0, [], 'r', { 'title': (self.isEmpty() ? '' : ':SyntasticCheck ' . self._name) })
|
||||
call setloclist(0, [], 'r', { 'title': ':SyntasticCheck ' . self._name })
|
||||
catch /\m^Vim\%((\a\+)\)\=:E\%(118\|731\)/
|
||||
" do nothing
|
||||
endtry
|
||||
|
Loading…
Reference in New Issue
Block a user