Bladeren bron

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 1 maand geleden
bovenliggende
commit
9883ee5180
1 gewijzigde bestanden met toevoegingen van 1 en 1 verwijderingen
  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