aboutsummaryrefslogtreecommitdiff
path: root/Command/VPop.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-02-18 22:12:42 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-02-18 22:12:42 -0400
commit5e91ef32c6d2d9903285668e48957d585914e606 (patch)
treea478648ab67b44623f68861aeb91cd684922bcda /Command/VPop.hs
parent2e68da3ffce043ed39c298ede0a378966211d390 (diff)
vpop N: remove skipped over views
Diffstat (limited to 'Command/VPop.hs')
-rw-r--r--Command/VPop.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Command/VPop.hs b/Command/VPop.hs
index fe6d35a32..c95701580 100644
--- a/Command/VPop.hs
+++ b/Command/VPop.hs
@@ -30,8 +30,9 @@ start ps = go =<< currentView
go (Just v) = do
showStart "vpop" (show num)
removeView v
- vs <- drop (num - 1) . filter (sameparentbranch v)
+ (oldvs, vs) <- splitAt (num - 1) . filter (sameparentbranch v)
<$> recentViews
+ mapM_ removeView oldvs
case vs of
(oldv:_) -> next $ next $ do
showOutput