X-Git-Url: https://git.distorted.org.uk/~mdw/termux-packages/blobdiff_plain/04c9591ade3c6c77d8d12019ac0e02f4c9c43ebd..3b70c1fcb0f5ec1df929cbce6cdc22acc2803ca7:/packages/neovim/runtime-autoload-man.vim.patch diff --git a/packages/neovim/runtime-autoload-man.vim.patch b/packages/neovim/runtime-autoload-man.vim.patch index eccef616..e61772db 100644 --- a/packages/neovim/runtime-autoload-man.vim.patch +++ b/packages/neovim/runtime-autoload-man.vim.patch @@ -1,20 +1,23 @@ -diff -u -r ../neovim-09c58f721ba64ce0e6e1b5d0f2b6291ec9a6555f/runtime/autoload/man.vim ./runtime/autoload/man.vim ---- ../neovim-09c58f721ba64ce0e6e1b5d0f2b6291ec9a6555f/runtime/autoload/man.vim 2016-07-13 12:09:26.000000000 -0400 -+++ ./runtime/autoload/man.vim 2016-08-04 11:23:49.834834852 -0400 -@@ -73,7 +73,7 @@ - if empty($MANWIDTH) - let $MANWIDTH = winwidth(0) - endif -- silent exec 'r!/usr/bin/man '.s:cmd(sect, page).' | col -b' -+ silent exec 'r!man '.s:cmd(sect, page).' | col -b | uniq' - " Remove blank lines from top and bottom. - while getline(1) =~# '^\s*$' - silent keepjumps 1delete _ -@@ -132,6 +132,6 @@ +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 @@ + let manwidth = empty($MANWIDTH) ? winwidth(0) : $MANWIDTH + " Force MANPAGER=cat to ensure Vim is not recursively invoked (by man-db). + " http://comments.gmane.org/gmane.editors.vim.devel/29085 +- 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])) endfunction - function s:find_page(sect, page) abort -- let where = system('/usr/bin/man '.s:man_find_arg.' '.s:cmd(a:sect, a:page)) -+ let where = system('man '.s:man_find_arg.' '.s:cmd(a:sect, a:page)) - return (where =~# '^ */') - endfunction +@@ -213,7 +213,9 @@ + + function! s:get_path(sect, name) abort + if empty(a:sect) +- return s:system(['man', s: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:find_arg, a:name]), "\n")[0] . "\n" + endif + " '-s' flag handles: + " - tokens like 'printf(echo)'