From 635a5c0a127233b478d25690274a574bda3925bc Mon Sep 17 00:00:00 2001 From: ocornut Date: Wed, 18 Feb 2026 16:08:49 +0100 Subject: [PATCH] Clipper: clear DisplayStart/DisplayEnd fields when Step() returns false. --- docs/CHANGELOG.txt | 2 ++ imgui.cpp | 1 + 2 files changed, 3 insertions(+) diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index 960b3f5b8..97be5c905 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -43,6 +43,8 @@ Breaking Changes: Other Changes: +- Clipper: clear DisplayStart/DisplayEnd fields when Step() returns false. + ----------------------------------------------------------------------- VERSION 1.92.6 (2026-02-17) diff --git a/imgui.cpp b/imgui.cpp index 0260481d4..7f0fc1189 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -3289,6 +3289,7 @@ void ImGuiListClipper::End() } TempData = NULL; } + DisplayStart = DisplayEnd = ItemsCount; // Clear this so code which may be reused past last Step() won't trip on a non-empty range. ItemsCount = -1; }