mirror of
https://github.com/junegunn/vim-plug.git
synced 2024-12-19 18:47:29 -07:00
Added version guard
https://github.com/junegunn/vim-plug/pull/1110#issuecomment-980545280
This commit is contained in:
parent
2958782ef4
commit
82ffd4f9ca
24
plug.vim
24
plug.vim
@ -399,8 +399,10 @@ function! plug#end()
|
|||||||
|
|
||||||
for [cmd, names] in items(lod.cmd)
|
for [cmd, names] in items(lod.cmd)
|
||||||
execute printf(
|
execute printf(
|
||||||
\ 'command! -nargs=* -range -bang -complete=file %s call s:lod_cmd(%s, "<bang>", <line1>, <line2>, <q-args>, <q-mods> ,%s)',
|
\ has('patch-7.4.1898')
|
||||||
\ cmd, string(cmd), string(names))
|
\ ? 'command! -nargs=* -range -bang -complete=file %s call s:lod_cmd(%s, "<bang>", <line1>, <line2>, <q-args>, <q-mods> ,%s)'
|
||||||
|
\ : 'command! -nargs=* -range -bang -complete=file %s call s:lod_cmd(%s, "<bang>", <line1>, <line2>, <q-args>, %s)'
|
||||||
|
\ , cmd, string(cmd), string(names))
|
||||||
endfor
|
endfor
|
||||||
|
|
||||||
for [map, names] in items(lod.map)
|
for [map, names] in items(lod.map)
|
||||||
@ -672,11 +674,19 @@ function! s:lod_ft(pat, names)
|
|||||||
call s:doautocmd('filetypeindent', 'FileType')
|
call s:doautocmd('filetypeindent', 'FileType')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:lod_cmd(cmd, bang, l1, l2, args, mods, names)
|
if has('patch-7.4.1898')
|
||||||
call s:lod(a:names, ['ftdetect', 'after/ftdetect', 'plugin', 'after/plugin'])
|
function! s:lod_cmd(cmd, bang, l1, l2, args, mods, names)
|
||||||
call s:dobufread(a:names)
|
call s:lod(a:names, ['ftdetect', 'after/ftdetect', 'plugin', 'after/plugin'])
|
||||||
execute printf('%s %s%s%s %s', a:mods, (a:l1 == a:l2 ? '' : (a:l1.','.a:l2)), a:cmd, a:bang, a:args)
|
call s:dobufread(a:names)
|
||||||
endfunction
|
execute printf('%s %s%s%s %s', a:mods, (a:l1 == a:l2 ? '' : (a:l1.','.a:l2)), a:cmd, a:bang, a:args)
|
||||||
|
endfunction
|
||||||
|
else
|
||||||
|
function! s:lod_cmd(cmd, bang, l1, l2, args, names)
|
||||||
|
call s:lod(a:names, ['ftdetect', 'after/ftdetect', 'plugin', 'after/plugin'])
|
||||||
|
call s:dobufread(a:names)
|
||||||
|
execute printf('%s%s%s %s', (a:l1 == a:l2 ? '' : (a:l1.','.a:l2)), a:cmd, a:bang, a:args)
|
||||||
|
endfunction
|
||||||
|
endif
|
||||||
|
|
||||||
function! s:lod_map(map, names, with_prefix, prefix)
|
function! s:lod_map(map, names, with_prefix, prefix)
|
||||||
call s:lod(a:names, ['ftdetect', 'after/ftdetect', 'plugin', 'after/plugin'])
|
call s:lod(a:names, ['ftdetect', 'after/ftdetect', 'plugin', 'after/plugin'])
|
||||||
|
Loading…
Reference in New Issue
Block a user