Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It is not possible to move the cursor outside the active buffer using ANSI commands #5041

Closed
DevTester425 opened this issue Apr 22, 2024 · 0 comments

Comments

@DevTester425
Copy link

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

  • Browser and browser version: all
  • OS version: all
  • xterm.js version: 5.1.0

Steps to reproduce

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
зображення

@xtermjs xtermjs locked and limited conversation to collaborators Apr 22, 2024
@Tyriar Tyriar converted this issue into discussion #5042 Apr 22, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant