Skip to content

Commit

Permalink
bugfix -p nil check #241
Browse files Browse the repository at this point in the history
  • Loading branch information
ray-x committed Nov 23, 2022
1 parent df1f43e commit c6b3c06
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lua/go/package.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c6b3c06

Please sign in to comment.