Bug fix: add support for Vim 7.1.261 and earlier.
This commit is contained in:
parent
f459416dc3
commit
49a94fe69f
@ -76,7 +76,7 @@ function! syntastic#util#tmpdir() abort " {{{2
|
|||||||
if (has('unix') || has('mac')) && executable('mktemp') && !has('win32unix')
|
if (has('unix') || has('mac')) && executable('mktemp') && !has('win32unix')
|
||||||
" TODO: option "-t" to mktemp(1) is not portable
|
" TODO: option "-t" to mktemp(1) is not portable
|
||||||
let tmp = $TMPDIR !=# '' ? $TMPDIR : $TMP !=# '' ? $TMP : '/tmp'
|
let tmp = $TMPDIR !=# '' ? $TMPDIR : $TMP !=# '' ? $TMP : '/tmp'
|
||||||
let out = split(syntastic#util#system('mktemp -q -d ' . tmp . '/vim-syntastic-' . getpid() . '-XXXXXXXX'), "\n")
|
let out = split(syntastic#util#system('mktemp -q -d ' . tmp . '/vim-syntastic-' . s:fuzz() . '-XXXXXXXX'), "\n")
|
||||||
if v:shell_error == 0 && len(out) == 1
|
if v:shell_error == 0 && len(out) == 1
|
||||||
let tempdir = out[0]
|
let tempdir = out[0]
|
||||||
endif
|
endif
|
||||||
@ -84,13 +84,13 @@ function! syntastic#util#tmpdir() abort " {{{2
|
|||||||
|
|
||||||
if tempdir ==# ''
|
if tempdir ==# ''
|
||||||
if has('win32') || has('win64')
|
if has('win32') || has('win64')
|
||||||
let tempdir = $TEMP . syntastic#util#Slash() . 'vim-syntastic-' . getpid()
|
let tempdir = $TEMP . syntastic#util#Slash() . 'vim-syntastic-' . s:fuzz()
|
||||||
elseif has('win32unix')
|
elseif has('win32unix')
|
||||||
let tempdir = syntastic#util#CygwinPath('/tmp/vim-syntastic-' . getpid())
|
let tempdir = syntastic#util#CygwinPath('/tmp/vim-syntastic-' . s:fuzz())
|
||||||
elseif $TMPDIR !=# ''
|
elseif $TMPDIR !=# ''
|
||||||
let tempdir = $TMPDIR . '/vim-syntastic-' . getpid()
|
let tempdir = $TMPDIR . '/vim-syntastic-' . s:fuzz()
|
||||||
else
|
else
|
||||||
let tempdir = '/tmp/vim-syntastic-' . getpid()
|
let tempdir = '/tmp/vim-syntastic-' . s:fuzz()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
try
|
try
|
||||||
@ -401,9 +401,6 @@ function! syntastic#util#setLastTick(buf) abort " {{{2
|
|||||||
call setbufvar(a:buf, 'syntastic_lasttick', getbufvar(a:buf, 'changedtick'))
|
call setbufvar(a:buf, 'syntastic_lasttick', getbufvar(a:buf, 'changedtick'))
|
||||||
endfunction " }}}2
|
endfunction " }}}2
|
||||||
|
|
||||||
let s:_wid_base = 'syntastic_' . getpid() . '_' . reltimestr(g:_SYNTASTIC_START) . '_'
|
|
||||||
let s:_wid_pool = 0
|
|
||||||
|
|
||||||
" Add unique IDs to windows
|
" Add unique IDs to windows
|
||||||
function! syntastic#util#setWids() abort " {{{2
|
function! syntastic#util#setWids() abort " {{{2
|
||||||
for tab in range(1, tabpagenr('$'))
|
for tab in range(1, tabpagenr('$'))
|
||||||
@ -614,8 +611,18 @@ endfunction "}}}2
|
|||||||
let s:_getbufvar = function(v:version > 703 || (v:version == 703 && has('patch831')) ? 'getbufvar' : 's:_getbufvar_dumb')
|
let s:_getbufvar = function(v:version > 703 || (v:version == 703 && has('patch831')) ? 'getbufvar' : 's:_getbufvar_dumb')
|
||||||
lockvar s:_getbufvar
|
lockvar s:_getbufvar
|
||||||
|
|
||||||
|
function! s:_fuzz_dumb() abort " {{{2
|
||||||
|
return 'tmp'
|
||||||
|
endfunction " }}}2
|
||||||
|
|
||||||
|
let s:_fuzz = function(exists('*getpid') ? 'getpid' : 's:_fuzz_dumb')
|
||||||
|
lockvar s:_fuzz
|
||||||
|
|
||||||
" }}}1
|
" }}}1
|
||||||
|
|
||||||
|
let s:_wid_base = 'syntastic_' . s:_fuzz() . '_' . reltimestr(g:_SYNTASTIC_START) . '_'
|
||||||
|
let s:_wid_pool = 0
|
||||||
|
|
||||||
let &cpo = s:save_cpo
|
let &cpo = s:save_cpo
|
||||||
unlet s:save_cpo
|
unlet s:save_cpo
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ if has('reltime')
|
|||||||
lockvar! g:_SYNTASTIC_START
|
lockvar! g:_SYNTASTIC_START
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let g:_SYNTASTIC_VERSION = '3.8.0-59'
|
let g:_SYNTASTIC_VERSION = '3.8.0-60'
|
||||||
lockvar g:_SYNTASTIC_VERSION
|
lockvar g:_SYNTASTIC_VERSION
|
||||||
|
|
||||||
" Sanity checks {{{1
|
" Sanity checks {{{1
|
||||||
|
@ -19,13 +19,13 @@ let s:save_cpo = &cpo
|
|||||||
set cpo&vim
|
set cpo&vim
|
||||||
|
|
||||||
function! SyntaxCheckers_lisp_clisp_GetLocList() dict
|
function! SyntaxCheckers_lisp_clisp_GetLocList() dict
|
||||||
|
let buf = bufnr('')
|
||||||
let tmpdir = syntastic#util#tmpdir()
|
let tmpdir = syntastic#util#tmpdir()
|
||||||
let out = tmpdir !=# '.' ? ('-o ' . syntastic#util#shescape(tmpdir . syntastic#util#Slash() . 'syntastic_' . getpid())) : ''
|
|
||||||
|
|
||||||
let makeprg = self.makeprgBuild({
|
let makeprg = self.makeprgBuild({
|
||||||
\ 'args_after': '-q',
|
\ 'args_after': '-q',
|
||||||
\ 'fname_before': '-c',
|
\ 'fname_before': '-c',
|
||||||
\ 'post_args_after': out })
|
\ 'post_args_after': ['-o', tmpdir] })
|
||||||
|
|
||||||
let errorformat =
|
let errorformat =
|
||||||
\ '%-G;%.%#,' .
|
\ '%-G;%.%#,' .
|
||||||
@ -40,7 +40,7 @@ function! SyntaxCheckers_lisp_clisp_GetLocList() dict
|
|||||||
let loclist = SyntasticMake({
|
let loclist = SyntasticMake({
|
||||||
\ 'makeprg': makeprg,
|
\ 'makeprg': makeprg,
|
||||||
\ 'errorformat': errorformat,
|
\ 'errorformat': errorformat,
|
||||||
\ 'defaults': {'bufnr': bufnr('')} })
|
\ 'defaults': {'bufnr': buf} })
|
||||||
|
|
||||||
call syntastic#util#rmrf(tmpdir)
|
call syntastic#util#rmrf(tmpdir)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user