| 439 | } |
| 440 | |
| 441 | static size_t next_utf8_char_pos(const std::string & line, size_t pos) { |
| 442 | if (pos >= line.length()) return line.length(); |
| 443 | pos++; |
| 444 | while (pos < line.length() && (line[pos] & 0xC0) == 0x80) { |
| 445 | pos++; |
| 446 | } |
| 447 | return pos; |
| 448 | } |
| 449 | |
| 450 | static void move_cursor(int delta); |
| 451 | static void move_word_left(size_t & char_pos, size_t & byte_pos, const std::vector<int> & widths, const std::string & line); |
no test coverage detected