Prompt: Use searchPredicate in more cases

Prompts based on `mkComplFunList` and `mkComplFunList'` were not
taking into account the `searchPredicate` funtion from `XPConfig`.
This was rather confusing.

We fix it by passing `XPConfig` to these functions; although
this is strictly more than they need, it makes the breaking change very
easy to fix and is also more future-proof.
This commit is contained in:
Daniel Gorin
2019-11-18 20:00:37 +00:00
parent 52f8c82504
commit 28b3e34fd7
13 changed files with 41 additions and 36 deletions

View File

@@ -51,5 +51,5 @@ xmonadPrompt c = do
-- | An xmonad prompt with a custom command list
xmonadPromptC :: [(String, X ())] -> XPConfig -> X ()
xmonadPromptC commands c =
mkXPrompt XMonad c (mkComplFunFromList' (map fst commands)) $
mkXPrompt XMonad c (mkComplFunFromList' c (map fst commands)) $
fromMaybe (return ()) . (`lookup` commands)