You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Windows, if the currently edited block does not fit in the console (the lines are too long and there are too many lines), and the cursor is moved around, the REPL's state gets corrupted: lines are overwritten with parts of other lines, parts of the prompt appear in places, the cursor behaviour doesn't match the text around it.
For example, in a small console window, I pressed Up to go back in history to this piece of colorsys:
defyiq_to_rgb(y, i, q):
# r = y + (0.27*q + 0.41*i) / (0.74*0.41 + 0.27*0.48)# b = y + (0.74*q - 0.48*i) / (0.74*0.41 + 0.27*0.48)# g = y - (0.30*(r-y) + 0.11*(b-y)) / 0.59r=y+0.9468822170900693*i+0.6235565819861433*qg=y-0.27478764629897834*i-0.6356910791873801*qb=y-1.1085450346420322*i+1.7090069284064666*qifr<0.0:
r=0.0ifg<0.0:
g=0.0ifb<0.0:
b=0.0ifr>1.0:
r=1.0ifg>1.0:
g=1.0ifb>1.0:
b=1.0return (r, g, b)
and then pressed some arrow keys to get:
CPython versions tested on:
CPython main branch
Operating systems tested on:
Windows
The text was updated successfully, but these errors were encountered:
encukou
changed the title
REPL on Windows doesn't handle blocks larger than the console window
REPL doesn't handle blocks larger than the console window on some terminals
Feb 27, 2025
Bug report
Bug description:
On Windows, if the currently edited block does not fit in the console (the lines are too long and there are too many lines), and the cursor is moved around, the REPL's state gets corrupted: lines are overwritten with parts of other lines, parts of the prompt appear in places, the cursor behaviour doesn't match the text around it.
For example, in a small console window, I pressed Up to go back in history to this piece of
colorsys
:and then pressed some arrow keys to get:
CPython versions tested on:
CPython main branch
Operating systems tested on:
Windows
The text was updated successfully, but these errors were encountered: