From fe9bc01d242e6c638b0341e341cd6be74650189d Mon Sep 17 00:00:00 2001 From: Karsten Schoelzel Date: Sat, 28 Jul 2007 15:25:07 +0200 Subject: Bugfix: reordering when filtering out the last window on a workspace Say you have three windows A B C* on a workspace with * marking the focus. If you close C or move it to another workspace, the resulting order will be B* A, thus reordering the other windows, defying the comment of filter. darcs-hash:20070728132507-eb3a1-064bb572b4a8ef7694f9939e1f2c714e3a32571b --- StackSet.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/StackSet.hs b/StackSet.hs index e6b2996..b8c31ce 100644 --- a/StackSet.hs +++ b/StackSet.hs @@ -311,7 +311,7 @@ filter :: (a -> Bool) -> Stack a -> StackOrNot a filter p (Stack f ls rs) = case L.filter p (f:rs) of f':rs' -> Just $ Stack f' (L.filter p ls) rs' -- maybe move focus down [] -> case L.filter p ls of -- filter back up - f':rs' -> Just $ Stack f' [] (reverse rs') -- else up + f':ls' -> Just $ Stack f' ls' [] -- else up [] -> Nothing -- | -- cgit v1.2.3