| 621 | } |
| 622 | |
| 623 | TextPosition MockEditorInterface::find_next(TextPosition from_position, const char *needle) { |
| 624 | auto doc = active_document(); |
| 625 | if (!doc) |
| 626 | return -1; |
| 627 | |
| 628 | auto pos = find_case_insensitive(std::string_view(doc->cur.data).substr(from_position), needle); |
| 629 | if (pos == std::string::npos) |
| 630 | return -1; |
| 631 | |
| 632 | return static_cast<TextPosition>(pos) + from_position; |
| 633 | } |
| 634 | |
| 635 | void MockEditorInterface::replace_text(TextPosition from, TextPosition to, std::string_view replacement) { |
| 636 | auto doc = active_document(); |
nothing calls this directly
no test coverage detected