mirror of
https://github.com/p-ranav/indicators.git
synced 2025-12-12 17:58:55 +08:00
Not hiding cursor in spinner
This commit is contained in:
@@ -30,12 +30,10 @@ public:
|
||||
std::unique_lock<std::mutex> lock{_mutex};
|
||||
_progress = value / 100.0;
|
||||
float pos = _progress * static_cast<float>(_bar_width);
|
||||
hide_cursor();
|
||||
std::cout << _states[_index % _states.size()];
|
||||
std::cout << " " << static_cast<int>(value) << "%";
|
||||
std::cout << " " << _name << "\r";
|
||||
std::cout.flush();
|
||||
show_cursor();
|
||||
_index += 1;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user