xtermjs / xterm.js

A terminal for the web
https://xtermjs.org/
MIT License
16.99k stars 1.59k forks source link

Line break bug #5074

Closed lsy934127847 closed 1 week ago

lsy934127847 commented 1 week ago
terminal.write("cosfs.sh\ndnspod.sh\ninstall_6.0.sh\ntxcdn.sh")

\n has a bug, image

terminal.write("cosfs.sh\r\ndnspod.sh\r\ninstall_6.0.sh\r\ntxcdn.sh")

\r\n is normal image

Do you want to manually replace \n with \r\n?

Tyriar commented 1 week ago

This is how it's meant to work; \n goes down, \r goes to the left