MCPcopy Create free account
hub / github.com/antirez/llama.cpp-deepseek-v4-flash / clear_current_line

Function clear_current_line

common/console.cpp:484–495  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

482 }
483
484 static void clear_current_line(const std::vector<int> & widths) {
485 int total_width = 0;
486 for (int w : widths) {
487 total_width += (w > 0 ? w : 1);
488 }
489
490 if (total_width > 0) {
491 std::string spaces(total_width, ' ');
492 fwrite(spaces.c_str(), 1, total_width, out);
493 move_cursor(-total_width);
494 }
495 }
496
497 static void set_line_contents(std::string new_line, std::string & line, std::vector<int> & widths, size_t & char_pos,
498 size_t & byte_pos, int cursor_byte_pos = -1) {

Callers 1

set_line_contentsFunction · 0.85

Calls 1

move_cursorFunction · 0.85

Tested by

no test coverage detected