better handling of input white characters
This commit is contained in:
parent
50a824f8ad
commit
a39b542b44
3 changed files with 4 additions and 2 deletions
|
@ -109,6 +109,7 @@ class TextBox(TextComponent):
|
|||
line = ""
|
||||
|
||||
if not c.isalnum():
|
||||
word = str(word)[:-1] + " "
|
||||
line += word
|
||||
word = ""
|
||||
|
||||
|
@ -153,6 +154,7 @@ class TextBox(TextComponent):
|
|||
invalid_text = line[invalid_start : user_pointer[1]]
|
||||
|
||||
reference_text = line[len(invalid_text) + len(valid_text) :]
|
||||
invalid_text = invalid_text.replace(" ", "_")
|
||||
|
||||
self.paint_text(screen, valid_text, self.valid_color)
|
||||
self.paint_text(screen, invalid_text, self.invalid_color)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[bumpversion]
|
||||
current_version = 1.5.0
|
||||
current_version = 1.5.1
|
||||
|
||||
[wheel]
|
||||
universal = 1
|
||||
|
|
2
setup.py
2
setup.py
|
@ -5,7 +5,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
|
|||
|
||||
setup(
|
||||
name="fasttyper",
|
||||
version="1.5.0",
|
||||
version="1.5.1",
|
||||
author="Piotr Domanski",
|
||||
author_email="pi.domanski@gmail.com",
|
||||
description="Minimalistic typing exercise",
|
||||
|
|
Loading…
Reference in a new issue