diff --git a/src/plugins/writing.py b/src/plugins/writing.py index 104ca06..d3c1926 100644 --- a/src/plugins/writing.py +++ b/src/plugins/writing.py @@ -30,9 +30,11 @@ def __update(world: World): writing = entity[Writing] text = entity[Text] for key in pressed: - if key == "backspace": + if key == "backspace" and text.text != writing.base_text: text.text = text.text[:-1] world.new_entity().set(CLICK_SOUND) + if text.text == "": + text.text = writing.base_text if key.startswith("["): # pavé numerique key = key[1] if key in writing.accepted_chars and (