File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -80,6 +80,7 @@ Other Changes:
80
80
- Drag and Drop: Fix drag and drop to tie same-size drop targets by choosen the later one. Fixes dragging
81
81
into a full-window-sized dockspace inside a zero-padded window. (#3519, #2717) [@Black-Cat]
82
82
- Checkbox: Added CheckboxFlags() helper with int* type.
83
+ - Clipper: Fixed incorrect end-list positioning when using ImGuiListClipper with 1 item (bug in 1.79). (#3663) [@nyorain]
83
84
- InputText: Fixed updating cursor/selection position when a callback altered the buffer in a way
84
85
where the byte count is unchanged but the decoded character count changes. (#3587) [@gqw]
85
86
- InputText: Fixed swiching from single to multi-line while preserving same ID.
Original file line number Diff line number Diff line change @@ -2266,8 +2266,8 @@ bool ImGuiListClipper::Step()
2266
2266
if (table && table->IsInsideRow)
2267
2267
ImGui::TableEndRow(table);
2268
2268
2269
- // Reached end of list
2270
- if (DisplayEnd >= ItemsCount || GetSkipItemForListClipping())
2269
+ // No items
2270
+ if (ItemsCount == 0 || GetSkipItemForListClipping())
2271
2271
{
2272
2272
End();
2273
2273
return false;
@@ -2320,6 +2320,13 @@ bool ImGuiListClipper::Step()
2320
2320
StepNo = 2;
2321
2321
}
2322
2322
2323
+ // Reached end of list
2324
+ if (DisplayEnd >= ItemsCount)
2325
+ {
2326
+ End();
2327
+ return false;
2328
+ }
2329
+
2323
2330
// Step 2: calculate the actual range of elements to display, and position the cursor before the first element
2324
2331
if (StepNo == 2)
2325
2332
{
You can’t perform that action at this time.
0 commit comments