When I paste code that is one line and my REPL window is small the text that would not be shown because it is offscreen is displayed after pressing enter.
Seems like there's two separate issues here, one with how Apple Terminal behaves when something is written to the last column of a line, and one with the cache. I understand what's causing the cache bug, but I'm still deciding how best to fix it.
Seems like there's two separate issues here, one with how Apple Terminal behaves when something is written to the last column of a line, and one with the cache. I understand what's causing the cache bug, but I'm still deciding how best to fix it.
The apple terminal one it's being handled here: #123267
Activity
skirpichev commented on Aug 22, 2024
Hmm, can someone reproduce this on recent main? Is this Mac-specific? I can't reproduce this on Linux.
pablogsal commented on Aug 23, 2024
I cannot reproduce exactly this, but there is something weird happening with macOS terminal application (I could not reproduce this with iTerm):
Screen.Recording.2024-08-23.at.14.20.38.movpablogsal commented on Aug 23, 2024
This seems partially related to the cache but not fully. Removing the line cache shows the following problem:
Screen.Recording.2024-08-23.at.14.34.00.movpablogsal commented on Aug 23, 2024
For some reason this only happens in the terminal app and not in iterm
pablogsal commented on Aug 23, 2024
Another problem: seems like the cache forces lines that warp around to also start with >>> (but they should not).
pablogsal commented on Aug 23, 2024
@godlygeek could you take a look at this if you have some free cycles?
Siecje commented on Aug 23, 2024
When I type random words like that as soon as I get to the end of the line I see strange behaviour including >>> moving.
Screen.Recording.2024-08-23.at.9.39.44.AM.movpablogsal commented on Aug 23, 2024
What terminal are you using?
pablogsal commented on Aug 23, 2024
Can you try if #123267 fixes the other problem for you?
Siecje commented on Aug 23, 2024
The default "Terminal"
pablogsal commented on Aug 23, 2024
Can you run echo $TERM_PROGRAM?
Siecje commented on Aug 23, 2024
Apple_Terminal
godlygeek commented on Aug 25, 2024
Seems like there's two separate issues here, one with how Apple Terminal behaves when something is written to the last column of a line, and one with the cache. I understand what's causing the cache bug, but I'm still deciding how best to fix it.
pablogsal commented on Aug 25, 2024
The apple terminal one it's being handled here: #123267
gh-123177: Deactivate line wrap for Apple Terminal via scape codes in…
pythongh-123177: Deactivate line wrap for Apple Terminal via scape co…
[3.13] gh-123177: Deactivate line wrap for Apple Terminal via scape c…
pythongh-123177: Fix prompt for wrapped lines in pyrepl
godlygeek commented on Aug 25, 2024
#123324 fixes the cache bug, and adds a test to exercise prompts with wrapping.
gh-123177: Fix prompt for wrapped lines in pyrepl (#123324)
pythongh-123177: Fix prompt for wrapped lines in pyrepl (pythonGH-123324
[3.13] gh-123177: Fix prompt for wrapped lines in pyrepl (GH-123324) (#…
pablogsal commented on Aug 26, 2024
Thanks for the report @Siecje and @godlygeek for the fix!