mirror of
https://github.com/neovim/neovim.git
synced 2025-12-15 19:05:40 +00:00
fix(man.lua): noisy "ENOENT" error on Windows #33409
Problem: :Man shows noisy "ENOENT: no such file or directory" error on Windows. Solution: Do some checks before calling `vim.system`.
This commit is contained in:
committed by
GitHub
parent
74ca73d545
commit
a8dd5c7e41
@@ -8,7 +8,7 @@ vim.api.nvim_create_user_command('Man', function(params)
|
||||
if params.bang then
|
||||
man.init_pager()
|
||||
else
|
||||
local err = man.open_page(params.count, params.smods, params.fargs)
|
||||
local _, err = pcall(man.open_page, params.count, params.smods, params.fargs)
|
||||
if err then
|
||||
vim.notify('man.lua: ' .. err, vim.log.levels.ERROR)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user