From e7a4d95a9e4765ec9338640e480b88c86a082fba Mon Sep 17 00:00:00 2001 From: Matthew Wynn Date: Fri, 5 May 2017 18:43:25 -0500 Subject: man.vim: Fix filename argument in mandoc #6693 Use the -l flag to open a man file. TODO: Does not work on SunOS. Fixes #6683 --- runtime/autoload/man.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'runtime') diff --git a/runtime/autoload/man.vim b/runtime/autoload/man.vim index c49c550b20..f5b863a899 100644 --- a/runtime/autoload/man.vim +++ b/runtime/autoload/man.vim @@ -135,7 +135,9 @@ function! s:get_page(path) abort 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 - return s:system(['env', 'MANPAGER=cat', 'MANWIDTH='.manwidth, 'man', a:path]) + let cmd = ['env', 'MANPAGER=cat', 'MANWIDTH='.manwidth, 'man'] + " Use -l everywhere except macOS. #6683 + return s:system(cmd + (has('mac') ? [a:path] : ['-l', a:path])) endfunction function! s:put_page(page) abort -- cgit