| 294 | } |
| 295 | |
| 296 | std::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 | |
| 307 | std::string NppInterface::get_current_line() const { return get_line(get_current_line_number()); } |
| 308 |
no test coverage detected