From d131207c75c5bbbf8d4a1066b91708a9d5cc0e11 Mon Sep 17 00:00:00 2001 From: StarQTius <> Date: Sun, 1 Oct 2023 04:29:12 +0200 Subject: [PATCH] Clean banners properly when several of them are showing --- src/shelltools/utility/synchronized_ostream.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/shelltools/utility/synchronized_ostream.py b/src/shelltools/utility/synchronized_ostream.py index 2a57729..b4413ad 100644 --- a/src/shelltools/utility/synchronized_ostream.py +++ b/src/shelltools/utility/synchronized_ostream.py @@ -153,10 +153,6 @@ async def update_banner( if not self.__use_rawinput: return - with self: - self.__ostream.write(_below(str(banner))) - rle.forced_update_display() - while not stop_event.is_set(): with self: self.__ostream.write( @@ -167,7 +163,7 @@ async def update_banner( await aio.sleep(refresh_delay_s) with self: - self.__ostream.write(_below(position=self.__banners.index(banner))) + self.__ostream.write(_below(position=len(self.__banners) - 1)) rle.forced_update_display() self.__banners.remove(banner)