Skip to content
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

Buffer.x and Buffer.y are not updated in realtime #2022

Closed
p3nt4 opened this issue Apr 19, 2019 · 1 comment
Closed

Buffer.x and Buffer.y are not updated in realtime #2022

p3nt4 opened this issue Apr 19, 2019 · 1 comment

Comments

@p3nt4
Copy link

p3nt4 commented Apr 19, 2019

This might be related to #2021
Apologies if I am not using the api correctly.

Details

  • Chrome: Version 73.0.3683.103
  • OS version: Windows 10
  • xterm.js version: 3.12.0

Steps to reproduce

  1. Create code such as:
console.log(term._core.buffer.x);
term.write(longstring);
console.log(term._core.buffer.x);

  1. Notice X has not been updated.
@Tyriar
Copy link
Member

Tyriar commented Apr 19, 2019

This is because parsing incoming data is fired asynchronously by design. Note that anything inside _core is private and you're not meant to be using. You will probably want #1994 when it gets in, in the meantime listen to .on('cursormove') to detect when changes to the buffer occur.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants