2017-01-17 15:51:17 +01:00
|
|
|
diff -u -r ../neovim-a062cd4ce58ba9aca6fdce443b014c9c0949ecde/runtime/autoload/man.vim ./runtime/autoload/man.vim
|
|
|
|
--- ../neovim-a062cd4ce58ba9aca6fdce443b014c9c0949ecde/runtime/autoload/man.vim 2017-01-16 23:18:19.000000000 +0100
|
|
|
|
+++ ./runtime/autoload/man.vim 2017-01-17 15:48:11.420879618 +0100
|
|
|
|
@@ -117,7 +117,7 @@
|
|
|
|
let manwidth = empty($MANWIDTH) ? winwidth(0) : $MANWIDTH
|
2017-01-02 01:00:36 +01:00
|
|
|
" Force MANPAGER=cat to ensure Vim is not recursively invoked (by man-db).
|
2016-09-24 21:09:38 +02:00
|
|
|
" http://comments.gmane.org/gmane.editors.vim.devel/29085
|
2017-01-17 15:51:17 +01:00
|
|
|
- return s:system(['env', 'MANPAGER=cat', 'MANWIDTH='.manwidth, 'man', a:path])
|
|
|
|
+ return s:system(['env', 'MANPAGER=cat', 'MANWIDTH='.manwidth, 'mandoc', a:path])
|
2016-09-24 21:09:38 +02:00
|
|
|
endfunction
|
|
|
|
|
2017-01-02 01:00:36 +01:00
|
|
|
function! s:put_page(page) abort
|
2017-01-17 15:51:17 +01:00
|
|
|
@@ -156,7 +156,9 @@
|
|
|
|
|
|
|
|
function! s:get_path(sect, name) abort
|
|
|
|
if empty(a:sect)
|
|
|
|
- return s:system(['man', s:man_find_arg, a:name])
|
|
|
|
+ " Take the first one if multiple lines returned, such as when
|
|
|
|
+ " both man1p/test.1p and man1/test.1 exists.
|
|
|
|
+ return split(s:system(['man', s:man_find_arg, a:name]), "\n")[0] . "\n"
|
|
|
|
endif
|
|
|
|
" '-s' flag handles:
|
|
|
|
" - tokens like 'printf(echo)'
|