Update vim to patch 8.0.1400 (#1945)
[termux-packages] / packages / neovim / runtime-autoload-man.vim.patch
index d21f45c..e61772d 100644 (file)
@@ -1,12 +1,23 @@
-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 @@
+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
-   " 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])
+-  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:put_page(page) abort
+@@ -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)'