Cleanup: Vim 7.4.1285 added reltimefloat().

This commit is contained in:
LCD 47 2016-02-08 16:52:53 +02:00
parent 89bc82a264
commit d445e18fe1
2 changed files with 9 additions and 2 deletions

View File

@ -173,10 +173,17 @@ endfunction " }}}2
" Utilities {{{1 " Utilities {{{1
function! s:_log_timestamp() abort " {{{2 function! s:_log_timestamp_smart() abort " {{{2
return printf('syntastic: %f: ', reltimefloat(reltime(g:_SYNTASTIC_START)))
endfunction " }}}2
function! s:_log_timestamp_dumb() abort " {{{2
return 'syntastic: ' . split(reltimestr(reltime(g:_SYNTASTIC_START)))[0] . ': ' return 'syntastic: ' . split(reltimestr(reltime(g:_SYNTASTIC_START)))[0] . ': '
endfunction " }}}2 endfunction " }}}2
let s:_log_timestamp = function(has('float') && exists('*reltimefloat') ? 's:_log_timestamp_smart' : 's:_log_timestamp_dumb')
lockvar s:_log_timestamp
function! s:_format_variable(name) abort " {{{2 function! s:_format_variable(name) abort " {{{2
let vals = [] let vals = []
if exists('g:syntastic_' . a:name) if exists('g:syntastic_' . a:name)

View File

@ -19,7 +19,7 @@ if has('reltime')
lockvar! g:_SYNTASTIC_START lockvar! g:_SYNTASTIC_START
endif endif
let g:_SYNTASTIC_VERSION = '3.7.0-83' let g:_SYNTASTIC_VERSION = '3.7.0-84'
lockvar g:_SYNTASTIC_VERSION lockvar g:_SYNTASTIC_VERSION
" Sanity checks {{{1 " Sanity checks {{{1