diff options
-rw-r--r-- | runtime/autoload/man.vim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/autoload/man.vim b/runtime/autoload/man.vim index f21e2ee4f3..77ccbdf888 100644 --- a/runtime/autoload/man.vim +++ b/runtime/autoload/man.vim @@ -212,9 +212,9 @@ function! man#extract_sect_and_name_ref(ref) abort endfunction function! s:get_path(sect, name) abort + " Some man implementations (OpenBSD) return all available paths from the + " search command, so we get() the first one. #8341 if empty(a:sect) - " Some man implementations (OpenBSD) return all available paths from the - " search command, so we get() the first one. #8341 return substitute(get(split(s:system(['man', s:find_arg, a:name])), 0, ''), '\n\+$', '', '') endif " '-s' flag handles: @@ -222,7 +222,7 @@ function! s:get_path(sect, name) abort " - sections starting with '-' " - 3pcap section (found on macOS) " - commas between sections (for section priority) - return substitute(s:system(['man', s:find_arg, s:section_arg, a:sect, a:name]), '\n\+$', '', '') + return substitute(get(split(s:system(['man', s:find_arg, s:section_arg, a:sect, a:name])), 0, ''), '\n\+$', '', '') endfunction function! s:verify_exists(sect, name) abort |