From e766065e67f43ffd524ad75efa10f1af4cce6b19 Mon Sep 17 00:00:00 2001 From: Doman Date: Sun, 11 Jul 2021 20:18:32 +0200 Subject: [PATCH] forgot this important if --- fasttyper/components.py | 5 +++-- setup.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/fasttyper/components.py b/fasttyper/components.py index eb56110..3759156 100644 --- a/fasttyper/components.py +++ b/fasttyper/components.py @@ -133,8 +133,9 @@ class TextBox(TextComponent): if next_word: last_line = lines[-1] - if len(last_line) != 0: - lines[-1] = lines[-1][: -len(next_word)] + if len(last_line) == 0: + lines = lines[:-1] + lines[-1] = lines[-1][: -len(next_word)] lines = lines[: self.maxy - self.usedy] return "\n".join(lines) diff --git a/setup.py b/setup.py index 4752068..3c32288 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ with open("README.md", "r", encoding="utf-8") as fh: setup( name="fasttyper-pkg-ickyicky", - version="0.0.2", + version="0.0.3", author="Piotr Domanski", author_email="pi.domanski@gmail.com", description="Minimalistic typing exercise",