From 214d40423492325ea24a3f8d63fdab58ad79eebc Mon Sep 17 00:00:00 2001 From: JP Etcheber Date: Sun, 26 May 2024 02:27:15 -0700 Subject: [PATCH] fix: backspace should remove text --- dashport/prompt.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dashport/prompt.py b/dashport/prompt.py index a941883..81a52f7 100644 --- a/dashport/prompt.py +++ b/dashport/prompt.py @@ -26,7 +26,10 @@ def validate_text(x): app.user_prompt_position += 1 if x == backspace_key() and len(command_line_entered) > 0: try: - command_line_entered.pop(app.user_prompt_position - 1) + if platform.system().lower() == "linux": + command_line_entered.pop(app.user_prompt_position - 2) + else: + command_line_entered.pop(app.user_prompt_position - 1) except IndexError: pass app.user_prompt_position -= 1