mirror of
https://github.com/neovim/neovim.git
synced 2025-12-11 17:12:40 +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()`
(cherry picked from commit 87bd16e470)
This commit is contained in:
committed by
github-actions[bot]
parent
d0ed06dcea
commit
5143419e22
@@ -427,7 +427,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