fixed vpop
This commit is contained in:
parent
72c118152f
commit
2bf338f443
3 changed files with 15 additions and 5 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue