Repository navigation
Conversation
Fixes length miscalculation when dealing with \b character that caused the cursor to be placed in an incorrect position
\\b\b
\b\b
| for c in plain: | ||
| if c == "\b": | ||
| # Backspace decreases cursor position, and cannot move before column 0. | ||
| length = max(length - 1, 0) |
There was a problem hiding this comment.
This adjusts the prompt width, but the render cells still count the backspace. With input('Question? _\b'), the terminal moves two columns too far left. Can we use the same cursor calculation in both places?
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase And if you don't make the requested changes, you will be put in the comfy chair! |
Fixes length miscalculation when dealing with \b character that caused the cursor to be placed in an incorrect position
Refactors
Lib/_pyrepl/utils.pywlento properly handle\bcharacters.inputbad cursor position when a backspace char\bis in the prompt #150462CC @pablogsal