Skip to content
Snippets Groups Projects
Commit 52fa8335 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Condition newline before progress display

Sometimes the progress meter (e.g. during file text searches) appears at a column offset > 0 and doesn't look good. Fix that.
parent cb4067ec
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #2362 passed
...@@ -1403,6 +1403,7 @@ void sbbs_t::progress(const char* text, int count, int total, int interval) ...@@ -1403,6 +1403,7 @@ void sbbs_t::progress(const char* text, int count, int total, int interval)
if(text == NULL) text = ""; if(text == NULL) text = "";
float pct = total ? ((float)count/total)*100.0F : 100.0F; float pct = total ? ((float)count/total)*100.0F : 100.0F;
SAFEPRINTF2(str, "[ %-8s %4.1f%% ]", text, pct); SAFEPRINTF2(str, "[ %-8s %4.1f%% ]", text, pct);
cond_newline();
cursor_left(backfill(str, pct, cfg.color[clr_progress_full], cfg.color[clr_progress_empty])); cursor_left(backfill(str, pct, cfg.color[clr_progress_full], cfg.color[clr_progress_empty]));
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment