Method for querying the beginning and end of a line
| 556 | |
| 557 | // Method for querying the beginning and end of a line |
| 558 | bool ZepBuffer::GetLineOffsets(const long line, ByteRange& range) const { |
| 559 | // Not valid |
| 560 | if ((long)m_lineEnds.size() <= line) { |
| 561 | range.first = 0; |
| 562 | range.second = 0; |
| 563 | return false; |
| 564 | } |
| 565 | |
| 566 | // Find the line bounds - we know the end, find the start from the previous |
| 567 | range.second = m_lineEnds[line]; |
| 568 | range.first = line == 0 ? 0 : m_lineEnds[line - 1]; |
| 569 | return true; |
| 570 | } |
| 571 | |
| 572 | std::string ZepBuffer::GetFileExtension() const { |
| 573 | std::string ext; |
no test coverage detected