X-Git-Url: https://git.distorted.org.uk/~mdw/termux-packages/blobdiff_plain/04c9591ade3c6c77d8d12019ac0e02f4c9c43ebd..c2c270c5db6879060d26f9e672e1045ded5d0ba3:/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..597a2776 100644 --- a/packages/neovim/runtime-autoload-man.vim.patch +++ b/packages/neovim/runtime-autoload-man.vim.patch @@ -1,20 +1,30 @@ -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 @@ - endfunction +diff -u -r ../neovim-7307096c5ef5f54e49f2f49fb049fe40f8417f7e/runtime/autoload/man.vim ./runtime/autoload/man.vim +--- ../neovim-7307096c5ef5f54e49f2f49fb049fe40f8417f7e/runtime/autoload/man.vim 2016-09-22 08:11:13.000000000 -0400 ++++ ./runtime/autoload/man.vim 2016-09-24 14:41:35.806285095 -0400 +@@ -79,7 +79,7 @@ + " http://comments.gmane.org/gmane.editors.vim.devel/29085 + " Respect $MANWIDTH, or default to window width. + let cmd = 'env MANPAGER=cat'.(empty($MANWIDTH) ? ' MANWIDTH='.winwidth(0) : '') +- let cmd .= ' '.s:man_cmd.' '.shellescape(a:path) ++ let cmd .= ' '.s:man_cmd.' -l '.shellescape(a:path).'| uniq' + silent put =system(cmd) + " remove all the backspaced text + execute 'silent keeppatterns keepjumps %substitute,.\b,,e'.(&gdefault?'':'g') +@@ -112,7 +112,7 @@ - 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 =~# '^ */') + function! s:get_path(sect, name) abort + if empty(a:sect) +- let path = system(s:man_cmd.' '.s:man_find_arg.' '.shellescape(a:name)) ++ let path = system(s:man_cmd.' '.s:man_find_arg.' '.shellescape(a:name).'| head -n 1') + if path !~# '^\/' + throw 'no manual entry for '.a:name + endif +@@ -123,7 +123,7 @@ + " - sections starting with '-' + " - 3pcap section (found on macOS) + " - commas between sections (for section priority) +- return system(s:man_cmd.' '.s:man_find_arg.' -s '.shellescape(a:sect).' '.shellescape(a:name)) ++ return system(s:man_cmd.' '.s:man_find_arg.' -s '.shellescape(a:sect).' '.shellescape(a:name).'| head -n 1') endfunction + + function! s:verify_exists(sect, name) abort