mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-04 18:58:12 +00:00
fix(debug): exclude vimrc from callers
This commit is contained in:
parent
b930a9360e
commit
8845a6a912
1 changed files with 7 additions and 1 deletions
|
@ -12,7 +12,13 @@ function M.inspect(...)
|
|||
local caller = debug.getinfo(1, "S")
|
||||
for level = 2, 10 do
|
||||
local info = debug.getinfo(level, "S")
|
||||
if info and info.source ~= caller.source and info.what == "Lua" and info.source ~= "lua" then
|
||||
if
|
||||
info
|
||||
and info.source ~= caller.source
|
||||
and info.what == "Lua"
|
||||
and info.source ~= "lua"
|
||||
and info.source ~= "@" .. vim.env.MYVIMRC
|
||||
then
|
||||
caller = info
|
||||
break
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue