aboutsummaryrefslogtreecommitdiff
path: root/runtime/autoload
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2020-12-04 18:36:54 -0500
committerGitHub <noreply@github.com>2020-12-04 18:36:54 -0500
commitb940cbb85875d4dce8dd20620b093be5a9b66283 (patch)
treef38b2b350d24696649974dc2d63a8501942f1ae6 /runtime/autoload
parent0c8d6ab536ec2e8e95c0de441e6ad1fdfccc909f (diff)
parentba2e94d223d6cf4bd2594f6f2b2bfeb2aaa29368 (diff)
downloadrneovim-b940cbb85875d4dce8dd20620b093be5a9b66283.tar.gz
rneovim-b940cbb85875d4dce8dd20620b093be5a9b66283.tar.bz2
rneovim-b940cbb85875d4dce8dd20620b093be5a9b66283.zip
Merge pull request #13417 from shade-of-noon/man_count.13411
runtime: Fix man.vim count handling.
Diffstat (limited to 'runtime/autoload')
-rw-r--r--runtime/autoload/man.vim6
1 files changed, 2 insertions, 4 deletions
diff --git a/runtime/autoload/man.vim b/runtime/autoload/man.vim
index 486ed99e3f..99d8c41dba 100644
--- a/runtime/autoload/man.vim
+++ b/runtime/autoload/man.vim
@@ -18,7 +18,7 @@ function! man#init() abort
endtry
endfunction
-function! man#open_page(count, count1, mods, ...) abort
+function! man#open_page(count, mods, ...) abort
if a:0 > 2
call s:error('too many arguments')
return
@@ -39,9 +39,7 @@ function! man#open_page(count, count1, mods, ...) abort
endif
try
let [sect, name] = s:extract_sect_and_name_ref(ref)
- if a:count ==# a:count1
- " v:count defaults to 0 which is a valid section, and v:count1 defaults to
- " 1, also a valid section. If they are equal, count explicitly set.
+ if a:count >= 0
let sect = string(a:count)
endif
let path = s:verify_exists(sect, name)