Skip to content

Commit

Permalink
Rename loop variables for clarity inside KeymapMerge
Browse files Browse the repository at this point in the history
  • Loading branch information
dkotik committed Dec 11, 2023
1 parent ac8c742 commit 3f9f085
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions input.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ func uniqueKeys(keys []Key) (unique []Key) {
func MergeKeymaps(maps ...Keymap) Keymap {
merged := make(Keymap)
for _, m := range maps {
for k, list := range m {
merged[k] = uniqueKeys(append(merged[k], list...))
for action, keys := range m {
merged[action] = uniqueKeys(append(merged[action], keys...))
}
}
return merged
Expand Down

0 comments on commit 3f9f085

Please sign in to comment.