Skip to content

Commit 6ea9ba0

Browse files
committed
a download bar outside a report is drawn when its download starts; the half-second wait is the status row's
1 parent a56f81f commit 6ea9ba0

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎src/ui.cppm‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -491,12 +491,14 @@ std::size_t max_live_lines() {
491491
constexpr auto kFirstDraw = std::chrono::milliseconds(500);
492492

493493
// Whether the region has something to draw on a terminal now; line_mutex()
494-
// held.
494+
// held. The half-second wait is the status row's: a download bar outside a
495+
// report is drawn when its download starts.
495496
bool may_draw_locked() {
496497
auto& r = region();
497498
if (r.suspended > 0 || g_quiet || !bars_live()) return false;
498499
if (r.drawnRows > 0) return true;
499-
if (!(r.open && r.live) && r.bars.empty()) return false;
500+
const bool report = r.open && r.live;
501+
if (!report) return !r.bars.empty();
500502
return std::chrono::steady_clock::now() - start_point() >= kFirstDraw;
501503
}
502504

0 commit comments

Comments
 (0)