From 728976bdebdd09e40edee0b28462989ad7118ed6 Mon Sep 17 00:00:00 2001 From: Arthur Sonzogni Date: Wed, 5 Jan 2022 12:04:03 +0100 Subject: [PATCH] Fix vscroll indicator (#295) * Clear vscroll_indicator content before drawing it. --- src/ftxui/dom/scroll_indicator.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ftxui/dom/scroll_indicator.cpp b/src/ftxui/dom/scroll_indicator.cpp index ec07467..541deda 100644 --- a/src/ftxui/dom/scroll_indicator.cpp +++ b/src/ftxui/dom/scroll_indicator.cpp @@ -54,6 +54,7 @@ Element vscroll_indicator(Element child) { bool down = (2 * y - 0 >= start_y) && (2 * y - 0 <= start_y + size); const char* c = up ? (down ? "┃" : "╹") : (down ? "╻" : " "); + screen.PixelAt(x, y) = Pixel(); screen.PixelAt(x, y).character = c; screen.PixelAt(x, y).inverted = true; }