Closed DevTester425 closed 2 months ago
Please describe the solution how to move the cursor to position 1;1 if term.buffer.active.baseY > 0. If this cannot be done by ANSI commands, describe any method.
run code
<!doctype html> <html> <head> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/xterm@5.1.0/css/xterm.min.css" /> <script src="https://cdn.jsdelivr.net/npm/xterm@5.1.0/lib/xterm.min.js"></script> </head> <body> <div id="terminal"></div> <script> (async () => { var term = new Terminal({ rows: 10 }); term.open(document.getElementById('terminal')); await write(term, '\r\n1\r\n2\r\n3\r\n4\r\n5\r\n6\r\n7\r\n8\r\n9\r\n10\r\n11\r\n12\r\n13\r\n14\r\n15'); term.scrollToTop(); await write(term, '\u001b[1;1H'); async function write(term, data) { return new Promise((resolve) => { term.write(data, resolve) }) } })() </script> </body> </html>
Result
Please describe the solution how to move the cursor to position 1;1 if term.buffer.active.baseY > 0. If this cannot be done by ANSI commands, describe any method.
Details
Steps to reproduce
run code
Result![зображення](https://github.com/xtermjs/xterm.js/assets/88549983/f6e3104d-c95a-4a32-b381-49d5c2245b73)