We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
table.map()
1 parent d1de78e commit ad77d95Copy full SHA for ad77d95
lua/init.lua
@@ -91,12 +91,10 @@ local function get_state(level)
91
local frame = stack[stack.pos][1]
92
local file, line = frame[2], frame[4]
93
-- Lookup stack frames.
94
- local call_stack = {}
95
- for _, frame in ipairs(stack) do
+ local call_stack = table.map(stack, function(frame)
96
frame = frame[1]
97
- call_stack[#call_stack + 1] = string.format('(%s) %s:%d', frame[1] or frame[5], frame[2],
98
- frame[4])
99
- end
+ return string.format('(%s) %s:%d', frame[1] or frame[5], frame[2], frame[4])
+ end)
100
call_stack.pos = stack.pos
101
-- Lookup variables (index 2) and upvalues (index 3) from the current frame.
102
local variables = {}
0 commit comments