impr: Allow hex editor view to be scrolled slightly past the end
This commit is contained in:
parent
7fc53bf861
commit
90267ec356
@ -334,12 +334,13 @@ namespace hex::plugin::builtin::ui {
|
|||||||
|
|
||||||
ImGuiListClipper clipper;
|
ImGuiListClipper clipper;
|
||||||
|
|
||||||
clipper.Begin(std::ceil(this->m_provider->getSize() / (long double)(this->m_bytesPerRow)), CharacterSize.y);
|
u64 numRows = std::ceil(this->m_provider->getSize() / (long double)(this->m_bytesPerRow));
|
||||||
|
clipper.Begin(numRows + size.y / CharacterSize.y - 3, CharacterSize.y);
|
||||||
while (clipper.Step()) {
|
while (clipper.Step()) {
|
||||||
this->m_visibleRowCount = clipper.DisplayEnd - clipper.DisplayStart;
|
this->m_visibleRowCount = clipper.DisplayEnd - clipper.DisplayStart;
|
||||||
|
|
||||||
// Loop over rows
|
// Loop over rows
|
||||||
for (u64 y = u64(clipper.DisplayStart); y < u64(clipper.DisplayEnd); y++) {
|
for (u64 y = u64(clipper.DisplayStart); y < std::min(numRows, u64(clipper.DisplayEnd)); y++) {
|
||||||
// Draw address column
|
// Draw address column
|
||||||
ImGui::TableNextRow();
|
ImGui::TableNextRow();
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user