Commit | Line | Data |
---|---|---|
a19f43f2 FF |
1 | diff -u -r ../neovim-a062cd4ce58ba9aca6fdce443b014c9c0949ecde/runtime/autoload/man.vim ./runtime/autoload/man.vim |
2 | --- ../neovim-a062cd4ce58ba9aca6fdce443b014c9c0949ecde/runtime/autoload/man.vim 2017-01-16 23:18:19.000000000 +0100 | |
3 | +++ ./runtime/autoload/man.vim 2017-01-17 15:48:11.420879618 +0100 | |
4 | @@ -117,7 +117,7 @@ | |
5 | let manwidth = empty($MANWIDTH) ? winwidth(0) : $MANWIDTH | |
ce86c98e | 6 | " Force MANPAGER=cat to ensure Vim is not recursively invoked (by man-db). |
64d68be9 | 7 | " http://comments.gmane.org/gmane.editors.vim.devel/29085 |
a19f43f2 FF |
8 | - return s:system(['env', 'MANPAGER=cat', 'MANWIDTH='.manwidth, 'man', a:path]) |
9 | + return s:system(['env', 'MANPAGER=cat', 'MANWIDTH='.manwidth, 'mandoc', a:path]) | |
64d68be9 FF |
10 | endfunction |
11 | ||
ce86c98e | 12 | function! s:put_page(page) abort |
a19f43f2 FF |
13 | @@ -156,7 +156,9 @@ |
14 | ||
15 | function! s:get_path(sect, name) abort | |
16 | if empty(a:sect) | |
17 | - return s:system(['man', s:man_find_arg, a:name]) | |
18 | + " Take the first one if multiple lines returned, such as when | |
19 | + " both man1p/test.1p and man1/test.1 exists. | |
20 | + return split(s:system(['man', s:man_find_arg, a:name]), "\n")[0] . "\n" | |
21 | endif | |
22 | " '-s' flag handles: | |
23 | " - tokens like 'printf(echo)' |