| 69 | } |
| 70 | |
| 71 | void MockEditorInterface::set_selection(TextPosition from, |
| 72 | TextPosition to) { |
| 73 | auto doc = active_document(); |
| 74 | if (!doc) |
| 75 | return; |
| 76 | doc->cursor_pos = to; |
| 77 | if (from < to) |
| 78 | doc->cur.selection = {from, to}; |
| 79 | else |
| 80 | doc->cur.selection = {to, from}; |
| 81 | } |
| 82 | |
| 83 | void MockEditorInterface::replace_selection( |
| 84 | const char *str) { |