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

Method selected_text

src/npp/NppInterface.cpp:296–305  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

294}
295
296std::string NppInterface::selected_text() const {
297 auto sel_buf_size = static_cast<int>(send_msg_to_scintilla(SCI_GETSELTEXT, 0, 0)) + 1;
298 if (sel_buf_size > 1) // Because it includes terminating '\0'
299 {
300 std::vector<char> buf(sel_buf_size);
301 send_msg_to_scintilla(SCI_GETSELTEXT, 0, reinterpret_cast<LPARAM>(buf.data()));
302 return buf.data();
303 }
304 return {};
305}
306
307std::string NppInterface::get_current_line() const { return get_line(get_current_line_number()); }
308

Callers 1

process_replace_allMethod · 0.45

Calls 1

dataMethod · 0.80

Tested by

no test coverage detected