diff options
| author | Anton Bobov <anton@bobov.name> | 2025-05-02 22:02:07 +0500 |
|---|---|---|
| committer | Anton Bobov <anton@bobov.name> | 2025-05-02 22:03:25 +0500 |
| commit | 473fabd36a9b51a4b914eca45075ca6f09f1a713 (patch) | |
| tree | 67324c028c1db701932edec2113b9a587cac8aa7 | |
| parent | 71c60ea3e5ff35495674f632283dc5a8e8c596ca (diff) | |
vim: vim-plug upgrade
| -rw-r--r-- | files/.vim/autoload/plug.vim | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/files/.vim/autoload/plug.vim b/files/.vim/autoload/plug.vim index da854b4..a225a6d 100644 --- a/files/.vim/autoload/plug.vim +++ b/files/.vim/autoload/plug.vim @@ -372,8 +372,10 @@ function! plug#end() for [cmd, names] in items(lod.cmd) execute printf( - \ 'command! -nargs=* -range -bang -complete=file %s call s:lod_cmd(%s, "<bang>", <line1>, <line2>, <q-args>, %s)', - \ cmd, string(cmd), string(names)) + \ has('patch-7.4.1898') + \ ? '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 for [map, names] in items(lod.map) @@ -651,11 +653,19 @@ function! s:lod_ft(pat, names) call s:doautocmd('filetypeindent', 'FileType') endfunction -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 +if has('patch-7.4.1898') + function! s:lod_cmd(cmd, bang, l1, l2, args, mods, names) + call s:lod(a:names, ['ftdetect', 'after/ftdetect', 'plugin', 'after/plugin']) + call s:dobufread(a:names) + 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) call s:lod(a:names, ['ftdetect', 'after/ftdetect', 'plugin', 'after/plugin']) |
