| 1 | diff -u -r ../neovim-7307096c5ef5f54e49f2f49fb049fe40f8417f7e/runtime/autoload/man.vim ./runtime/autoload/man.vim |
| 2 | --- ../neovim-7307096c5ef5f54e49f2f49fb049fe40f8417f7e/runtime/autoload/man.vim 2016-09-22 08:11:13.000000000 -0400 |
| 3 | +++ ./runtime/autoload/man.vim 2016-09-24 14:41:35.806285095 -0400 |
| 4 | @@ -79,7 +79,7 @@ |
| 5 | " http://comments.gmane.org/gmane.editors.vim.devel/29085 |
| 6 | " Respect $MANWIDTH, or default to window width. |
| 7 | let cmd = 'env MANPAGER=cat'.(empty($MANWIDTH) ? ' MANWIDTH='.winwidth(0) : '') |
| 8 | - let cmd .= ' '.s:man_cmd.' '.shellescape(a:path) |
| 9 | + let cmd .= ' '.s:man_cmd.' -l '.shellescape(a:path).'| uniq' |
| 10 | silent put =system(cmd) |
| 11 | " remove all the backspaced text |
| 12 | execute 'silent keeppatterns keepjumps %substitute,.\b,,e'.(&gdefault?'':'g') |
| 13 | @@ -112,7 +112,7 @@ |
| 14 | |
| 15 | function! s:get_path(sect, name) abort |
| 16 | if empty(a:sect) |
| 17 | - let path = system(s:man_cmd.' '.s:man_find_arg.' '.shellescape(a:name)) |
| 18 | + let path = system(s:man_cmd.' '.s:man_find_arg.' '.shellescape(a:name).'| head -n 1') |
| 19 | if path !~# '^\/' |
| 20 | throw 'no manual entry for '.a:name |
| 21 | endif |
| 22 | @@ -123,7 +123,7 @@ |
| 23 | " - sections starting with '-' |
| 24 | " - 3pcap section (found on macOS) |
| 25 | " - commas between sections (for section priority) |
| 26 | - return system(s:man_cmd.' '.s:man_find_arg.' -s '.shellescape(a:sect).' '.shellescape(a:name)) |
| 27 | + return system(s:man_cmd.' '.s:man_find_arg.' -s '.shellescape(a:sect).' '.shellescape(a:name).'| head -n 1') |
| 28 | endfunction |
| 29 | |
| 30 | function! s:verify_exists(sect, name) abort |