diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-11-06 13:44:57 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-11-06 13:44:57 -0400 |
commit | 22b30805290ccd3ac1bc467c113c8560ec4f114f (patch) | |
tree | 3f64ae66e9ad605d6ea621aa6a3ee2f5c8fa4bd1 /Messages/Concurrent.hs | |
parent | b6f03f9298265d559e5918fa89e482ea3a2483a9 (diff) |
Concurrent progress bars are now displayed when using -J with a command that moves file contents around.
Diffstat (limited to 'Messages/Concurrent.hs')
-rw-r--r-- | Messages/Concurrent.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Messages/Concurrent.hs b/Messages/Concurrent.hs index 5b125a97f..e4bc647b9 100644 --- a/Messages/Concurrent.hs +++ b/Messages/Concurrent.hs @@ -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 |