Concurrent progress bars are now displayed when using -J with a command that moves file contents around.

This commit is contained in:
Joey Hess 2015-11-06 13:44:57 -04:00
parent 8ea594f565
commit 416c7656a1
Failed to extract signature
3 changed files with 33 additions and 52 deletions

View file

@ -98,7 +98,13 @@ inOwnConsoleRegion a = do
inOwnConsoleRegion = id
#endif
{- The progress region is displayed inline with the current console region. -}
#ifdef WITH_CONCURRENTOUTPUT
withProgressRegion :: (Regions.ConsoleRegion -> Annex a) -> Annex a
withProgressRegion a = do
parent <- consoleRegion <$> Annex.getState Annex.output
Regions.withConsoleRegion (maybe Regions.Linear Regions.InLine parent) a
instance Regions.LiftRegion Annex where
liftRegion = liftIO . atomically
#endif