-
-
Notifications
You must be signed in to change notification settings - Fork 245
bpython breaks line with ANSI escape code #670
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
While I managed to get over the previous issue: I really can't get things to work without this being fixed. I'd appreciate if you could fix it. |
@sebastinas @thomasballinger What do you think? Since no other REPLs has this issue, the inconsistency between them and bpython certainly brings undesired behavior to some libraries, which I think is a serious problem. |
Handling of escape characters happens in curtsies. So while this certainly is an issue that affects bpython, it needs to be fixed in curtsies. I think @thomasballinger wouldn't mind getting bug reports and/or test cases for that. |
Thanks to @ata2001 the second issue you mentioned https://github.com/thomasballinger/curtsies/issues/97 is fixed. Fixing length issues is possible via the wcwidth-based width of a curtsies FmtStr. https://github.com/thomasballinger/curtsies/issues/8 is the most relevant issue for this, we should consider this bpython issue blocked on that, because the version of curtsies currently used in bpython doesn't have this width. (probably because there's no released version of curtsies with a working |
Thanks guys. Looking forward to a new release. 😄 |
Test cases would not be bad for this, but I'd need some help with doing that. |
This can be easily reproduced by typing
In bpython

In Python

I guess when calculating the length of output, bpython counts all chars, but not all chars are visible, thus leading to this bug.
The text was updated successfully, but these errors were encountered: