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

Method selected_text

test/MockEditorInterface.cpp:391–397  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

389std::wstring MockEditorInterface::plugin_config_dir() const { return L""; }
390
391std::string MockEditorInterface::selected_text() const {
392 auto doc = active_document();
393 if (!doc || doc->cur.selection[0] < 0 || doc->cur.selection[1] < 0)
394 return "";
395 return doc->cur.data.substr(doc->cur.selection[0],
396 doc->cur.selection[1] - doc->cur.selection[0]);
397}
398
399std::string MockEditorInterface::get_current_line() const {
400 return get_line(get_current_line_number());

Callers 1

Calls 1

substrMethod · 0.80

Tested by

no test coverage detected