From e340dfa45668ac119ebddc0d9645fa801c6e8e85 Mon Sep 17 00:00:00 2001 From: Clemens Fruhwirth Date: Sat, 16 Oct 2010 23:29:04 +0200 Subject: Make substring search case insensitive Ignore-this: dce1ae9e4164c24447ae9c79c4557f11 darcs-hash:20101016212904-ed0c4-97eb2fdce04a77c3ea64a65e4bd5074ee6256453.gz --- XMonad/Actions/GridSelect.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'XMonad/Actions') diff --git a/XMonad/Actions/GridSelect.hs b/XMonad/Actions/GridSelect.hs index 91735ed..434d1d1 100644 --- a/XMonad/Actions/GridSelect.hs +++ b/XMonad/Actions/GridSelect.hs @@ -53,6 +53,7 @@ module XMonad.Actions.GridSelect ( ) where import Data.Maybe import Data.Bits +import Data.Char import Control.Applicative import Control.Monad.State import Control.Arrow @@ -216,7 +217,8 @@ td_elementmap s = let positions = td_availSlots s elements = L.filter (((td_searchString s) `isSubstringOf`) . fst) (td_elements s) in zipWith (,) positions elements - where sub `isSubstringOf` string = or [ sub `isPrefixOf` t | t <- tails string ] + where sub `isSubstringOf` string = or [ (upper sub) `isPrefixOf` t | t <- tails (upper string) ] + upper = map toUpper newtype TwoD a b = TwoD { unTwoD :: StateT (TwoDState a) X b } deriving (Monad,Functor,MonadState (TwoDState a)) -- cgit v1.2.3