Running Windows 11 with indicatif 0.18.0.
The following code reproduces the problem:
use indicatif::{ProgressBar, ProgressStyle};
fn main() {
let bar = ProgressBar::new(100)
.with_style(ProgressStyle::with_template("{bar:10.red/blue}").unwrap());
bar.inc(25);
std::process::exit(0);
}
Result:
Expected:
Bug hunt
The incorrectly colored character seems to be caused by cur being set to 1, rendering the 'not filled' character here.
The solution would be to color the cur character properly if it is the 'not filled' character.
I'm not sure how to implement this change because the code structure makes this really hard to solve without hacky workarounds. It simply doesn't seem to be intended that the cur character gets colored.
On the other hand, the cur character seems to be required because otherwise the progress bar gets one too short.