neovim: Update and tweak
[termux-packages] / packages / neovim / runtime-autoload-man.vim.patch
index eccef61..d21f45c 100644 (file)
@@ -1,20 +1,12 @@
-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-c5f4b92ff93a40ec4e77b78d0576903e7a60eefd/runtime/autoload/man.vim ./runtime/autoload/man.vim
+--- ../neovim-c5f4b92ff93a40ec4e77b78d0576903e7a60eefd/runtime/autoload/man.vim        2017-01-01 15:12:33.000000000 -0500
++++ ./runtime/autoload/man.vim 2017-01-01 18:56:40.067529143 -0500
+@@ -116,7 +116,7 @@
+   " Force MANPAGER=cat to ensure Vim is not recursively invoked (by man-db).
+   " http://comments.gmane.org/gmane.editors.vim.devel/29085
+   " Respect $MANWIDTH, or default to window width.
+-  return s:system(['env', 'MANPAGER=cat', (empty($MANWIDTH) ? 'MANWIDTH='.winwidth(0) : ''), 'man', a:path])
++  return s:system(['env', 'MANPAGER=cat', (empty($MANWIDTH) ? 'MANWIDTH='.winwidth(0) : ''), 'mandoc', 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
+ function! s:put_page(page) abort