Skip to content

Commit

Permalink
X.U.EZConfig: Fix checkKeymap warning that all keybindings are duplicate
Browse files Browse the repository at this point in the history
This reverts part of 42179b8, which
effectively changed the duplicate check from >1 to >=1.
  • Loading branch information
ulrikdem committed Feb 16, 2024
1 parent 93ad0ef commit aec2186
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@

* Fix build-with-cabal.sh when XDG_CONFIG_HOME is defined.

* `XMonad.Util.EZConfig`

- Fixed `checkKeymap` warning that all keybindings are duplicates.

### Other changes

## 0.18.0 (February 3, 20
Expand Down
4 changes: 2 additions & 2 deletions XMonad/Util/EZConfig.hs
Original file line number Diff line number Diff line change
Expand Up @@ -552,8 +552,8 @@ doKeymapCheck :: XConfig l -> [(String,a)] -> ([String], [String])
doKeymapCheck conf km = (bad,dups)
where ks = map ((readKeySequence conf &&& id) . fst) km
bad = nub . map snd . filter (isNothing . fst) $ ks
dups = map (snd . NE.head)
. mapMaybe nonEmpty
dups = map (snd . NE.head . notEmpty)
. filter ((>1) . length)
. groupBy ((==) `on` fst)
. sortBy (comparing fst)
. map (first fromJust)
Expand Down

0 comments on commit aec2186

Please sign in to comment.