From 9f69e8ec1244da90a8cf5ff7593c73015e692fde Mon Sep 17 00:00:00 2001 From: Spencer Janssen Date: Thu, 3 May 2007 23:40:07 +0200 Subject: Avoid the unsafe pattern match, in case Config.hs has no layouts darcs-hash:20070503214007-a5988-f427a9747f76859219abf029c2f550e7dbec258f --- Operations.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Operations.hs b/Operations.hs index 1fd3482..8df287d 100644 --- a/Operations.hs +++ b/Operations.hs @@ -48,7 +48,7 @@ refresh = do flip mapM_ (M.assocs (W.screen2ws ws)) $ \(scn, n) -> do let sc = genericIndex xinesc scn -- temporary coercion! - (l:_) = case M.findWithDefault defaultLayouts n fls of {[] -> defaultLayouts; l -> l} + l = fromMaybe full (do (x:_) <- M.lookup n fls; return x) mapM_ (\(w, rect) -> io $ moveWindowInside d w rect) $ (doLayout l) sc $ W.index n ws whenJust (W.peekStack n ws) (io . raiseWindow d) whenJust (W.peek ws) setFocus -- cgit v1.2.3