mirror of
https://github.com/neovim/neovim.git
synced 2026-03-31 21:02:11 +00:00
fix(man.lua): :Man slow/hangs if MANPAGER is set #36689
Problem:
When `MANPAGER` is set to something like 'nvim +Man!',
`vim.system({ 'nvim' })` call waits forever for input and times out
after 10 seconds in `system()` and the assert on `stdout` being not
`nil` fails.
Solution:
Set `MANPAGER=cat` when calling `system()`
This commit is contained in:
@@ -428,7 +428,8 @@ local function get_page(path, silent)
|
||||
if localfile_arg == nil then
|
||||
local mpath = get_path('man')
|
||||
-- Check for -l support.
|
||||
localfile_arg = (mpath and system({ 'man', '-l', mpath }, true) or '') ~= ''
|
||||
localfile_arg = (mpath and system({ 'man', '-l', mpath }, true, { MANPAGER = 'cat' }) or '')
|
||||
~= ''
|
||||
end
|
||||
|
||||
local cmd = localfile_arg and { 'man', '-l', path } or { 'man', path }
|
||||
|
||||
Reference in New Issue
Block a user