MCPcopy Create free account
hub / github.com/XorTroll/Goldleaf / ScrollDown

Method ScrollDown

Goldleaf/source/ui/ui_FileContentLayout.cpp:76–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74 }
75
76 bool FileContentLayout::ScrollDown() {
77 if(!this->read_lines.empty()) {
78 this->read_lines.erase(this->read_lines.begin());
79 this->line_offset++;
80
81 const auto new_line_l = this->ReadLines(this->line_offset + this->read_lines.size(), 1);
82 if(!new_line_l.empty()) {
83 this->read_lines.push_back(new_line_l.front());
84 }
85
86 this->UpdateLineLimits();
87 return true;
88 }
89 return false;
90 }
91
92 bool FileContentLayout::MoveLeft() {
93 if(this->x_offset > 0) {

Callers 1

OnInputMethod · 0.95

Calls 2

ReadLinesMethod · 0.95
UpdateLineLimitsMethod · 0.95

Tested by

no test coverage detected