mirror of
https://github.com/neovim/neovim.git
synced 2026-01-06 19:39:53 +10:00
fix(lua): don't remove first char of non-file stacktrace source (#37008)
This commit is contained in:
@@ -1252,7 +1252,7 @@ local function traceback()
|
||||
if not info then
|
||||
break
|
||||
end
|
||||
local msg = (' %s:%s'):format(info.source:sub(2), info.currentline)
|
||||
local msg = (' %s:%s'):format(info.source:gsub('^@', ''), info.currentline)
|
||||
table.insert(backtrace, msg)
|
||||
level = level + 1
|
||||
end
|
||||
|
||||
@@ -492,7 +492,7 @@ function M._profile(opts)
|
||||
|
||||
if opts and opts.loaders then
|
||||
for l, loader in pairs(loaders) do
|
||||
local loc = debug.getinfo(loader, 'Sn').source:sub(2)
|
||||
local loc = debug.getinfo(loader, 'Sn').source:gsub('^@', '')
|
||||
loaders[l] = track('loader ' .. l .. ': ' .. loc, loader)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user