-
-
Notifications
You must be signed in to change notification settings - Fork 33.3k
gh-140502: fix default REPL does not handle tab right #140697
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
|
On windows it works as expected without patch. After patch: So, it seems working. |
|
|
||
| if c == "\x1a": # CTRL-Z on Windows | ||
| if c == "\t": # gh-140502: handle tabs | ||
| width = 8 - (sum(char_widths) % 8) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be better to use a constant here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the code below not use constant, so its fine here
Co-authored-by: Sergey Miryanov <sergey.miryanov@gmail.com>
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
|
@pablogsal @ambv Could you please take a look. |
and found there is no test for
disp_stralso add a test for it.
after this patch
cc @sergey-miryanov