aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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