2017-06-05 02:19:38 +02:00
|
|
|
diff -u -r ../neovim-1b2acb8d958c1c8e2f382c2de9c98586801fd9fe/runtime/autoload/man.vim ./runtime/autoload/man.vim
|
|
|
|
--- ../neovim-1b2acb8d958c1c8e2f382c2de9c98586801fd9fe/runtime/autoload/man.vim 2017-06-03 21:00:05.000000000 +0200
|
|
|
|
+++ ./runtime/autoload/man.vim 2017-06-05 01:15:56.254306768 +0200
|
|
|
|
@@ -148,7 +148,7 @@
|
2017-01-17 15:51:17 +01:00
|
|
|
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-06-05 02:19:38 +02:00
|
|
|
- let cmd = ['env', 'MANPAGER=cat', 'MANWIDTH='.manwidth, 'man']
|
|
|
|
+ let cmd = ['env', 'MANPAGER=cat', 'MANWIDTH='.manwidth, 'mandoc']
|
|
|
|
return s:system(cmd + (s:localfile_arg ? ['-l', a:path] : [a:path]))
|
2016-09-24 21:09:38 +02:00
|
|
|
endfunction
|
|
|
|
|
2017-06-05 02:19:38 +02:00
|
|
|
@@ -213,7 +213,9 @@
|
2017-01-17 15:51:17 +01:00
|
|
|
|
|
|
|
function! s:get_path(sect, name) abort
|
|
|
|
if empty(a:sect)
|
2017-06-05 02:19:38 +02:00
|
|
|
- return s:system(['man', s:find_arg, a:name])
|
2017-01-17 15:51:17 +01:00
|
|
|
+ " Take the first one if multiple lines returned, such as when
|
|
|
|
+ " both man1p/test.1p and man1/test.1 exists.
|
2017-06-05 02:19:38 +02:00
|
|
|
+ return split(s:system(['man', s:find_arg, a:name]), "\n")[0] . "\n"
|
2017-01-17 15:51:17 +01:00
|
|
|
endif
|
|
|
|
" '-s' flag handles:
|
|
|
|
" - tokens like 'printf(echo)'
|