Skip to content

Commit

Permalink
fix: sort keys case insensitive #25
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Apr 29, 2021
1 parent 9b9cece commit e26be8c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/which-key/keys.lua
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ function M.get_mappings(mode, prefix, buf)
if not (ret.mapping and ret.mapping.plugin) then
table.sort(tmp, function(a, b)
if a.group == b.group then
return (a.key or "") < (b.key or "")
return (a.key or ""):lower() < (b.key or ""):lower()
else
return (a.group and 1 or 0) < (b.group and 1 or 0)
end
Expand Down

0 comments on commit e26be8c

Please sign in to comment.