X.U.EZConfig: Fix checkKeymap warning that all keybindings are duplicate

This reverts part of 42179b8625d83b2cd3c3a35da84de6f6c0dea6d6, which
effectively changed the duplicate check from >1 to >=1.
This commit is contained in:
Ulrik de Muelenaere 2024-02-15 19:55:47 -05:00
parent 93ad0ef2ea
commit aec21860ba
2 changed files with 6 additions and 2 deletions

View File

@ -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

View File

@ -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)