| 56 | } |
| 57 | |
| 58 | bool FileContentLayout::ScrollUp() { |
| 59 | if(this->line_offset > 0) { |
| 60 | if(this->read_lines.size() >= this->available_line_count) { |
| 61 | this->read_lines.pop_back(); |
| 62 | } |
| 63 | this->line_offset--; |
| 64 | |
| 65 | const auto new_line_l = this->ReadLines(this->line_offset, 1); |
| 66 | if(!new_line_l.empty()) { |
| 67 | this->read_lines.insert(this->read_lines.begin(), new_line_l.front()); |
| 68 | } |
| 69 | |
| 70 | this->UpdateLineLimits(); |
| 71 | return true; |
| 72 | } |
| 73 | return false; |
| 74 | } |
| 75 | |
| 76 | bool FileContentLayout::ScrollDown() { |
| 77 | if(!this->read_lines.empty()) { |
no test coverage detected