mirror of
https://github.com/neovim/neovim.git
synced 2025-11-09 20:15:24 +00:00
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
This commit is contained in:
committed by
Justin M. Keyes
parent
8c8ea1f8f3
commit
e7a4d95a9e
@@ -135,7 +135,9 @@ function! s:get_page(path) abort
|
|||||||
let manwidth = empty($MANWIDTH) ? winwidth(0) : $MANWIDTH
|
let manwidth = empty($MANWIDTH) ? winwidth(0) : $MANWIDTH
|
||||||
" Force MANPAGER=cat to ensure Vim is not recursively invoked (by man-db).
|
" Force MANPAGER=cat to ensure Vim is not recursively invoked (by man-db).
|
||||||
" http://comments.gmane.org/gmane.editors.vim.devel/29085
|
" 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
|
endfunction
|
||||||
|
|
||||||
function! s:put_page(page) abort
|
function! s:put_page(page) abort
|
||||||
|
|||||||
Reference in New Issue
Block a user