mirror of
https://github.com/neovim/neovim.git
synced 2026-07-31 12:49:11 +00:00
fix(man): use direct lookup without manpath #40421
Problem: On NetBSD, `man -w open` can return the exact manpage path, but `:Man` may still fail when man directories cannot be discovered from `manpath -q`, bare `man -w`, or `$MANPATH`. Solution: Fall back to the direct manpage lookup when directory discovery fails. Add a test for resolving `open(2)` through `goto_tag()` without manpath data.
This commit is contained in:
@@ -510,6 +510,11 @@ local function get_paths(name, sect)
|
||||
or vim.env.MANPATH
|
||||
|
||||
if not mandirs_raw then
|
||||
-- Fall back to direct lookup ("man -w [sect] name"). NetBSD man lacks "-w". #25919
|
||||
local ok, path = pcall(M._find_path, name, sect)
|
||||
if ok and path then
|
||||
return { path }
|
||||
end
|
||||
return {}, "Could not determine man directories from: 'man -w', 'manpath' or $MANPATH"
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user