Skip to content

Commit a0d682c

Browse files
committed
fix regression due to 6dd22d1, error when inspecting arrays
1 parent 81415bd commit a0d682c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lua/osv/init.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -974,7 +974,7 @@ function M.prepare_attach(blocking)
974974

975975
else
976976
local v = {}
977-
v.name = ln
977+
v.name = tostring(ln)
978978
v.variablesReference = 0
979979
if type(lv) == "table" then
980980
vars_ref[vars_id] = lv
@@ -1007,7 +1007,7 @@ function M.prepare_attach(blocking)
10071007

10081008
else
10091009
local v = {}
1010-
v.name = ln
1010+
v.name = tostring(ln)
10111011
v.variablesReference = 0
10121012
if type(lv) == "table" then
10131013
vars_ref[vars_id] = lv
@@ -1032,7 +1032,7 @@ function M.prepare_attach(blocking)
10321032
elseif type(ref) == "table" then
10331033
for ln, lv in pairs(ref) do
10341034
local v = {}
1035-
v.name = ln
1035+
v.name = tostring(ln)
10361036
v.variablesReference = 0
10371037
if type(lv) == "table" then
10381038
vars_ref[vars_id] = lv

src/handlers/variables.lua.t2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ end
4949
if vim.startswith(ln, "(") then
5050

5151
;; fill variable struct
52-
v.name = ln
52+
v.name = tostring(ln)
5353
v.variablesReference = 0
5454
if type(lv) == "table" then
5555
; make variable reference for table

0 commit comments

Comments
 (0)