Skip to content

Commit

Permalink
fix: backspace should remove text
Browse files Browse the repository at this point in the history
  • Loading branch information
numbertheory committed May 26, 2024
1 parent c09d95a commit 214d404
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dashport/prompt.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 214d404

Please sign in to comment.