Remove set_cursor_state, let's not overcomplicate things for now

This commit is contained in:
Marcus Holland-Moritz 2023-06-27 14:13:29 +02:00
parent 449d7490ac
commit 34a03061fe
4 changed files with 0 additions and 22 deletions

View File

@ -43,8 +43,6 @@ class console_writer : public logger {
level_type threshold, display_mode mode = NORMAL,
bool verbose = false);
~console_writer();
void write(level_type level, const std::string& output, char const* file,
int line) override;

View File

@ -50,8 +50,6 @@ void setup_terminal();
bool stream_is_fancy_terminal(std::ostream& os);
bool set_cursor_state(bool enabled);
char const* terminal_color(termcolor color);
std::string

View File

@ -75,11 +75,8 @@ console_writer::console_writer(std::ostream& os, progress_mode pg_mode,
} else {
set_policy<prod_logger_policy>();
}
set_cursor_state(false);
}
console_writer::~console_writer() { set_cursor_state(true); }
void console_writer::rewind() {
if (!statebuf_.empty()) {
int lines = 0;

View File

@ -58,21 +58,6 @@ void WindowsEmulateVT100Terminal(DWORD std_handle) {
}
#endif
bool set_cursor_state(bool enabled [[maybe_unused]]) {
bool was_enabled = true;
#ifdef _WIN32
auto hdl = ::GetStdHandle(STD_OUTPUT_HANDLE);
::CONSOLE_CURSOR_INFO cursorInfo;
::GetConsoleCursorInfo(hdl, &cursorInfo);
was_enabled = cursorInfo.bVisible;
cursorInfo.bVisible = enabled;
::SetConsoleCursorInfo(hdl, &cursorInfo);
#endif
return was_enabled;
}
void setup_terminal() {
#ifdef _WIN32
WindowsEmulateVT100Terminal(STD_OUTPUT_HANDLE);