MCPcopy Create free account
hub / github.com/FastFlowLM/FastFlowLM / clear_line_from_cursor

Method clear_line_from_cursor

src/runner/cli_wide.cpp:249–257  ·  view source on GitHub ↗

\brief Clear line from cursor to end

Source from the content-addressed store, hash-verified

247
248/// \brief Clear line from cursor to end
249void CLIWide::clear_line_from_cursor() {
250 CONSOLE_SCREEN_BUFFER_INFO csbi;
251 if (GetConsoleScreenBufferInfo(hConsoleOutput, &csbi)) {
252 DWORD written;
253 int chars_to_clear = csbi.dwSize.X - csbi.dwCursorPosition.X;
254 FillConsoleOutputCharacter(hConsoleOutput, ' ', chars_to_clear, csbi.dwCursorPosition, &written);
255 FillConsoleOutputAttribute(hConsoleOutput, csbi.wAttributes, chars_to_clear, csbi.dwCursorPosition, &written);
256 }
257}
258
259/// \brief Set cursor position to specific column
260void CLIWide::set_cursor_position(int column) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected