aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua
diff options
context:
space:
mode:
authorJosh Hirschkorn <53196448+vortexisalpha@users.noreply.github.com>2026-07-27 14:20:46 +0100
committerGitHub <noreply@github.com>2026-07-27 13:20:46 +0000
commit97a71ab4846c4b92a1e658ec00ff3eae74bf1256 (patch)
tree9d357d8b89b9bfe64fb9d1d4ad9b52c0adf77691 /runtime/lua
parent0b3b12da8d076c9f00511e75e5276816d0b68ebc (diff)
downloadrneovim-97a71ab4846c4b92a1e658ec00ff3eae74bf1256.tar.gz
rneovim-97a71ab4846c4b92a1e658ec00ff3eae74bf1256.tar.bz2
rneovim-97a71ab4846c4b92a1e658ec00ff3eae74bf1256.zip
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.
Diffstat (limited to 'runtime/lua')
-rw-r--r--runtime/lua/man.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/lua/man.lua b/runtime/lua/man.lua
index 787a4e63d1..1dd5a3c585 100644
--- a/runtime/lua/man.lua
+++ b/runtime/lua/man.lua
@@ -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