aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Wynn <matthew@matthewwynn.com>2017-05-05 18:43:25 -0500
committerJustin M. Keyes <justinkz@gmail.com>2017-05-08 17:45:06 +0200
commite7a4d95a9e4765ec9338640e480b88c86a082fba (patch)
treeb2b295b06f45cc3b2f4f10362023762a203718ca
parent8c8ea1f8f3ffd76a2a6a6b12530377cedd9fd82c (diff)
downloadrneovim-e7a4d95a9e4765ec9338640e480b88c86a082fba.tar.gz
rneovim-e7a4d95a9e4765ec9338640e480b88c86a082fba.tar.bz2
rneovim-e7a4d95a9e4765ec9338640e480b88c86a082fba.zip
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
-rw-r--r--runtime/autoload/man.vim4
1 files changed, 3 insertions, 1 deletions
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