mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-05-19 03:20:21 -07:00
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:
parent
93ad0ef2ea
commit
aec21860ba
@ -10,6 +10,10 @@
|
|||||||
|
|
||||||
* Fix build-with-cabal.sh when XDG_CONFIG_HOME is defined.
|
* Fix build-with-cabal.sh when XDG_CONFIG_HOME is defined.
|
||||||
|
|
||||||
|
* `XMonad.Util.EZConfig`
|
||||||
|
|
||||||
|
- Fixed `checkKeymap` warning that all keybindings are duplicates.
|
||||||
|
|
||||||
### Other changes
|
### Other changes
|
||||||
|
|
||||||
## 0.18.0 (February 3, 20
|
## 0.18.0 (February 3, 20
|
||||||
|
@ -552,8 +552,8 @@ doKeymapCheck :: XConfig l -> [(String,a)] -> ([String], [String])
|
|||||||
doKeymapCheck conf km = (bad,dups)
|
doKeymapCheck conf km = (bad,dups)
|
||||||
where ks = map ((readKeySequence conf &&& id) . fst) km
|
where ks = map ((readKeySequence conf &&& id) . fst) km
|
||||||
bad = nub . map snd . filter (isNothing . fst) $ ks
|
bad = nub . map snd . filter (isNothing . fst) $ ks
|
||||||
dups = map (snd . NE.head)
|
dups = map (snd . NE.head . notEmpty)
|
||||||
. mapMaybe nonEmpty
|
. filter ((>1) . length)
|
||||||
. groupBy ((==) `on` fst)
|
. groupBy ((==) `on` fst)
|
||||||
. sortBy (comparing fst)
|
. sortBy (comparing fst)
|
||||||
. map (first fromJust)
|
. map (first fromJust)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user