| 711 | } |
| 712 | |
| 713 | std::vector<TextfileWindow::Line>::iterator TextfileWindow::GetIteratorFromPosition(int pos) |
| 714 | { |
| 715 | for (auto it = std::begin(this->lines); it != std::end(this->lines); ++it) { |
| 716 | pos -= it->num_lines; |
| 717 | if (pos <= 0) return it; |
| 718 | } |
| 719 | return std::end(this->lines); |
| 720 | } |
| 721 | |
| 722 | void TextfileWindow::ScrollToLine(size_t line) |
| 723 | { |
no test coverage detected