MCPcopy Create free account
hub / github.com/Predelnik/DSpellCheck / set_selection

Method set_selection

test/MockEditorInterface.cpp:71–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69}
70
71void 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
83void MockEditorInterface::replace_selection(
84 const char *str) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected