fixed vpop

This commit is contained in:
Joey Hess 2014-02-18 21:02:27 -04:00
parent 72c118152f
commit 2bf338f443
3 changed files with 15 additions and 5 deletions

View file

@ -27,6 +27,7 @@ start = go =<< currentView
where
go Nothing = error "Not in a view."
go (Just v) = do
showStart "vcycle" ""
let v' = v { viewComponents = vcycle [] (viewComponents v) }
if v == v'
then do

View file

@ -28,10 +28,11 @@ start = go =<< currentView
where
go Nothing = error "Not in a view."
go (Just v) = do
vs <- dropWhile (/= v) . filter (sameparentbranch v)
<$> recentViews
showStart "vpop" ""
removeView v
vs <- filter (sameparentbranch v) <$> recentViews
case vs of
(_v:oldv:_) -> next $ next $
(oldv:_) -> next $ next $ do
checkoutViewBranch oldv (return . branchView)
_ -> next $ next $
inRepo $ Git.Command.runBool