diff options
author | Will Thompson <will@willthompson.co.uk> | 2011-08-08 15:36:09 +0200 |
---|---|---|
committer | Will Thompson <will@willthompson.co.uk> | 2011-08-08 15:50:24 +0200 |
commit | 56fed71634fb1a89ec30eb98c0f54b4a770dfb01 (patch) | |
tree | 1a5f381e9cfadb289e6483f87fccb8c46e306cd6 /Bustle.hs | |
parent | 92c35bd2976203a046915effc8ddd3ba306103cc (diff) |
When filtering, preserve currently-selected event
Diffstat (limited to 'Bustle.hs')
-rw-r--r-- | Bustle.hs | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -398,9 +398,13 @@ updateDisplayedLog wi rr shapesRef widthRef regionSelectionRef = do writeIORef shapesRef shapes writeIORef widthRef width - -- FIXME: try to preserve the currently-selected message? - modifyRegionSelection regionSelectionRef wi $ - const (regionSelectionNew (rrRegions rr)) + modifyRegionSelection regionSelectionRef wi $ \rs -> + let + rs' = regionSelectionNew (rrRegions rr) + in + case rsCurrent rs of + Just (_, x) -> regionSelectionSelect x rs' + Nothing -> rs' layoutSetSize layout (floor width) (floor height) |