From 79d598db5c32f84a0d12131d0f24f99edcb0f5ce Mon Sep 17 00:00:00 2001 From: Andrea Rossato Date: Sat, 16 Feb 2008 14:37:38 +0100 Subject: Theme: move theme's nextCompletion implementation to Prompt.getNextCompletion darcs-hash:20080216133738-32816-bcecfaa205c235b6e480a25bdc03d222aa205d51.gz --- XMonad/Prompt/Theme.hs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'XMonad/Prompt/Theme.hs') diff --git a/XMonad/Prompt/Theme.hs b/XMonad/Prompt/Theme.hs index cf67a36..89063a5 100644 --- a/XMonad/Prompt/Theme.hs +++ b/XMonad/Prompt/Theme.hs @@ -45,10 +45,7 @@ data ThemePrompt = ThemePrompt instance XPrompt ThemePrompt where showXPrompt ThemePrompt = "Select a theme: " commandToComplete _ c = c - nextCompletion _ c l = l !! idx - where idx = case c `elemIndex` l of - Just i -> if i >= length l - 1 then 0 else i + 1 - Nothing -> 0 + nextCompletion _ = getNextCompletion themePrompt :: XPConfig -> X () themePrompt c = mkXPrompt ThemePrompt c (const . return . map ppThemeInfo $ listOfThemes) changeTheme -- cgit v1.2.3