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
{{ message }}
Repository navigation
REPL doesn't handle blocks larger than the console window on some terminals #129220
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)
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[/+]on Feb 27, 2025
Activity
StanFromIreland commentedon Feb 26, 2025
This also causes weird behavior on Linux for example this happened:
Details
If I move my cursor up on a small screen it results in:
This occurred several times when trying it.
Ptyixs on Fedora 41, cpython main branch
[-]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[/+]