Open coderk17 opened 2 years ago
The ioctl man page says that rows (i.e. height) comes first, and then columns (width). I've also used this code to do basically the same thing you describe years ago, to have a web based terminal in the Jupyter interface (part of this is the terminado package).
So double check and see if it's possible that the parameters are being switched round somewhere before they get to ptyprocess. :slightly_smiling_face:
All right, I'll check again and post the results below. Thank you for your reply.
Recently I made a Web terminal with ptyprocess, websocket, and XTerm, but eventually found that the Web terminal size could not adapt after the resize event was triggered.
I even thought my computer was actually a big phone until I switched the positions of two parameters and the page appeared normal.
Before:
After using the following modified code, the interface display is normal: