MCPcopy Create free account
hub / github.com/appdevforall/CodeOnTheGo / move_to_line_start

Function move_to_line_start

subprojects/llama.cpp/common/console.cpp:519–527  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

517 }
518
519 static void move_to_line_start(size_t & char_pos, size_t & byte_pos, const std::vector<int> & widths) {
520 int back_width = 0;
521 for (size_t i = 0; i < char_pos; ++i) {
522 back_width += widths[i];
523 }
524 move_cursor(-back_width);
525 char_pos = 0;
526 byte_pos = 0;
527 }
528
529 static void move_to_line_end(size_t & char_pos, size_t & byte_pos, const std::vector<int> & widths, const std::string & line) {
530 int forward_width = 0;

Callers 2

set_line_contentsFunction · 0.85
readline_advancedFunction · 0.85

Calls 1

move_cursorFunction · 0.85

Tested by

no test coverage detected