| 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; |
no test coverage detected