Skip to content

Commit

Permalink
fix(command): weird issue with number keys. no idea when this happens…
Browse files Browse the repository at this point in the history
…. oh well... Fixes #528
  • Loading branch information
folke committed Jul 4, 2024
1 parent d3f8b9d commit 95568c6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lua/trouble/command.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ function M.complete_opts()
while #stack > 0 do
local top = table.remove(stack)
for k, v in pairs(top.t) do
if k:match("^[a-z_]+$") then
if type(k) == "number" then
k = "[" .. k .. "]"
elseif k:match("^[a-z_]+$") then
k = "." .. k
else
k = ("[%q]"):format(k)
Expand Down

0 comments on commit 95568c6

Please sign in to comment.