Explorar o código

fix(which-key): handle nil command in binding

Fix nil reference error when binding.command is nil by providing
a fallback value.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Bernardo Magri hai 1 mes
pai
achega
9883ee5180
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      lua/packages/which-key.lua

+ 1 - 1
lua/packages/which-key.lua

@@ -141,7 +141,7 @@ function which_key.format_hints(bindings, max_width)
             hint = binding.key .. ":" .. desc
         else
             -- Truncate long command names
-            local cmd = binding.command
+            local cmd = binding.command or "?"
             if #cmd > 15 then
                 cmd = cmd:sub(1, 12) .. "..."
             end