From 3ff252ca86442e73c7bf56f63fe696043883388b Mon Sep 17 00:00:00 2001 From: Anmol Sethi Date: Tue, 9 Aug 2016 20:18:04 -0400 Subject: man.vim: use -range instead of -count (#5203) With -count, if the first argument is a number, it is made available with . Problem is, there is always a default count it is impossible to tell whether the user set it. Since v:count and v:count1 still work with 'keywordprg', -count is unnecessary. But 'keywordprg' still calls ':Man' with a count prefixed. So it must still accept a count in the line number position, but not consume the first argument. This is done with -range. Fixes #5202. --- runtime/plugin/man.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/plugin/man.vim b/runtime/plugin/man.vim index b60c98abb8..d49276047f 100644 --- a/runtime/plugin/man.vim +++ b/runtime/plugin/man.vim @@ -5,7 +5,7 @@ if exists('g:loaded_man') endif let g:loaded_man = 1 -command! -count=0 -complete=customlist,man#complete -nargs=+ Man call man#open_page(v:count, v:count1, ) +command! -range=0 -complete=customlist,man#complete -nargs=+ Man call man#open_page(v:count, v:count1, ) nnoremap (Man) :call man#open_page(v:count, v:count1, &filetype ==# 'man' ? expand('') : expand('')) -- cgit