summaryrefslogtreecommitdiff
path: root/Messages/Concurrent.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Messages/Concurrent.hs')
-rw-r--r--Messages/Concurrent.hs6
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