@@ -372,8 +372,10 @@ function! plug#end()
372
372
373
373
for [cmd, names] in items(lod.cmd)
374
374
execute printf(
375
- \ 'command! -nargs=* -range -bang -complete=file %s call s:lod_cmd(%s, "<bang>", <line1>, <line2>, <q-args>, %s)',
376
- \ cmd, string(cmd), string(names))
375
+ \ has('patch-7.4.1898')
376
+ \ ? 'command! -nargs=* -range -bang -complete=file %s call s:lod_cmd(%s, "<bang>", <line1>, <line2>, <q-args>, <q-mods> ,%s)'
377
+ \ : 'command! -nargs=* -range -bang -complete=file %s call s:lod_cmd(%s, "<bang>", <line1>, <line2>, <q-args>, %s)'
378
+ \ , cmd, string(cmd), string(names))
377
379
endfor
378
380
379
381
for [map, names] in items(lod.map)
@@ -651,11 +653,19 @@ function! s:lod_ft(pat, names)
651
653
call s:doautocmd('filetypeindent', 'FileType')
652
654
endfunction
653
655
654
- function! s:lod_cmd(cmd, bang, l1, l2, args, names)
655
- call s:lod(a:names, ['ftdetect', 'after/ftdetect', 'plugin', 'after/plugin'])
656
- call s:dobufread(a:names)
657
- execute printf('%s%s%s %s', (a:l1 == a:l2 ? '' : (a:l1.','.a:l2)), a:cmd, a:bang, a:args)
658
- endfunction
656
+ if has('patch-7.4.1898')
657
+ function! s:lod_cmd(cmd, bang, l1, l2, args, mods, names)
658
+ call s:lod(a:names, ['ftdetect', 'after/ftdetect', 'plugin', 'after/plugin'])
659
+ call s:dobufread(a:names)
660
+ execute printf('%s %s%s%s %s', a:mods, (a:l1 == a:l2 ? '' : (a:l1.','.a:l2)), a:cmd, a:bang, a:args)
661
+ endfunction
662
+ else
663
+ function! s:lod_cmd(cmd, bang, l1, l2, args, names)
664
+ call s:lod(a:names, ['ftdetect', 'after/ftdetect', 'plugin', 'after/plugin'])
665
+ call s:dobufread(a:names)
666
+ execute printf('%s%s%s %s', (a:l1 == a:l2 ? '' : (a:l1.','.a:l2)), a:cmd, a:bang, a:args)
667
+ endfunction
668
+ endif
659
669
660
670
function! s:lod_map(map, names, with_prefix, prefix)
661
671
call s:lod(a:names, ['ftdetect', 'after/ftdetect', 'plugin', 'after/plugin'])
0 commit comments