Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
gh-132267: fix desynchronized cursor position and buffer mismatch after resize#132360
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 ourterms of service andprivacy 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
Hi! I tested this PR on my Mac, MacOS latest and it works great. It also helped me find another Pyrepl bug. |
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.
This has conflicts now.
feoh commentedMay 19, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Hi. I think I found a bug with this PR. Tested on MacOS latest. I reproduced this in WezTerm and also Apple's Terminal.app. In particular, if you type or paste a very long line into the terminal with this patch, leaving your cursor at the end, and then hit Ctrl/Cmd+/- a number of times to resize the text, you'll find the cursor in the middle of the line. |
Thanks@feoh for catching that bug! |
Some testcase might need to update if the behavior of resizing changes. |
@ImFeH2 Hi! I'm delighted I could help! Went to re-test and for some reason I can't check out this PR:
I'll try a fresh CPython checkout later from the hotel and see if that helps :) |
feoh commentedMay 21, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
ImFeH2 commentedMay 23, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Does this bug only appear in Wezterm so far? I tested it in Terminal.app on my MacOS VM and Windows Terminal - both display the text normally without this layout issue. 392644679-221442837.mp4 |
Uh oh!
There was an error while loading.Please reload this page.
changes:
Console.sync_screen
to recalculate the cursor position and the screen buffer based on changes in console width.Reader.calc_screen
.