From b5b8a337365c7e9560b3d57fcd0a0934023b11af Mon Sep 17 00:00:00 2001 From: Norbert Zeh Date: Fri, 4 Jun 2010 10:14:31 +0200 Subject: Fix bug in history maintenance of X.A.GroupNavigation Ignore-this: 84a22797ec1b76a9b9805af3272911b0 When the focused window was closed without a new window receiving focus, the closed window was not removed from the history database, making for example "nextMatch History (return True)" misbehave. This patch fixes this. darcs-hash:20100604081431-18a2b-d8416c45ccc86ac7e95e4cb49face9f13b242da7.gz --- XMonad/Actions/GroupNavigation.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'XMonad/Actions/GroupNavigation.hs') diff --git a/XMonad/Actions/GroupNavigation.hs b/XMonad/Actions/GroupNavigation.hs index 306c0f2..37a4ec9 100644 --- a/XMonad/Actions/GroupNavigation.hs +++ b/XMonad/Actions/GroupNavigation.hs @@ -174,8 +174,8 @@ updateHistory :: HistoryDB -> X HistoryDB updateHistory (HistoryDB oldcur oldhist) = withWindowSet $ \ss -> do let newcur = currentWindow ss wins = Set.fromList $ SS.allWindows ss - newhist = flt (flip Set.member wins) oldhist - return $ HistoryDB newcur (del newcur $ ins oldcur newhist) + newhist = flt (flip Set.member wins) (ins oldcur oldhist) + return $ HistoryDB newcur (del newcur newhist) where ins x xs = maybe xs (<| xs) x del x xs = maybe xs (\x' -> flt (/= x') xs) x -- cgit v1.2.3