Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upCrash when matching line in history has specific length #767
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Warning, this bug can "corrupt" your
~/.pythonhist. Before exploring it, make a backup of that file, and be prepared to delete it often.Steps to reproduce: Write a command that has the size of precisely the screen length, as in: After typing the last character, a newline should happen. (This is another bug, but I don't care about it.) Press enter. Then type the first character of that command.
Expected behavior: bpython suggests the previous command.
Actual behavior: bpython crashes immediately after typing that first character.
Example session:
Note that I'm not sure about the set of vulnerable lengths. It may be that the bug-criterion is more general, but the above recipe always produces a crash.
Here's a screen capture of the bug happening:
bpython3-screen-overflow.zip
This bug seems unrelated from #113, since the stacktrace is very different.
EDIT: Yeah, I know, sorry for constantly running into weird edge cases. But I swear, I didn't want to run into this one! Or any of the others.