jupyter/terminado

Clear command doesn't work properly on Windows

blink1073 opened this issue · 1 comments

It resets the cursor but doesn't clear the screen. I might need to look into how node-pty handles this.

I looked into this. I couldn't spot any differences between how node-pty creates the terminal and how pywinpty does. I made sure they were passing the same configuration flags (locally). When I run a bash script with clear in it with node-pty, the output is as expected. When I run it using pywinpty.PTY, I get \x1b[0K\r\n (Erase from current position to end) for as many lines as are in the terminal, followed by an \x1b[#A (Cursor Up). I'll come back to this with fresh eyes at another point.