bugfix -p nil check #241

This commit is contained in:
ray-x 2022-11-24 09:54:52 +11:00
parent df1f43ef55
commit c6b3c061cd

View File

@ -259,7 +259,12 @@ outline = function(...)
path = vfn.fnamemodify(path, ':p')
if arg == '-p' then
path = select(2, ...)
local pkg = select(2, ...)
if pkg ~= nil then
path = pkg
else
vim.notify('no package provided')
end
else
path = '.' .. util.sep() .. '...' -- how about window?
end