aboutsummaryrefslogtreecommitdiffstats
path: root/Main.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Main.hs')
-rw-r--r--Main.hs10
1 files changed, 4 insertions, 6 deletions
diff --git a/Main.hs b/Main.hs
index 1f51e9c..4a7a914 100644
--- a/Main.hs
+++ b/Main.hs
@@ -210,11 +210,9 @@ view :: Int -> W ()
view o = do
ws <- gets workspace
let m = W.current ws
- when (n /= m) $
- whenJust (W.index n ws) $ \new ->
- whenJust (W.index m ws) $ \old -> do
- mapM_ hide old
- mapM_ reveal new
- windows $ W.view n
+ when (n /= m) $ do
+ mapM_ hide (W.index m ws)
+ mapM_ reveal (W.index n ws)
+ windows $ W.view n
where n = o-1