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

Infinite scrollback #948

Closed
twifty opened this issue Sep 5, 2017 · 1 comment
Closed

Infinite scrollback #948

twifty opened this issue Sep 5, 2017 · 1 comment
Labels
help wanted type/bug Something is misbehaving
Milestone

Comments

@twifty
Copy link

twifty commented Sep 5, 2017

In #518 it was mentioned that a large number should be given. In most APIs, if we want to specify such an infinite number, we would either pass -1 or 0.

xterm causes an error for:

  1. scrollback: -1, produces: "Invalid array length"
  2. scrollback: 0, produces: "cannot read index 0 of undefined"
  3. scrollback: Number.MAX_SAFE_INTEGER, produces "Invalid array length"

It appears that JS arrays are limited to an unsigned 32 bit value.

A better approach would be to detect scrollback <= 0 || scrollback > 4294967295 and assign it the max upper value of 4294967295

@Tyriar
Copy link
Member

Tyriar commented Sep 6, 2017

👍 PRs welcome

@Tyriar Tyriar added type/bug Something is misbehaving help wanted labels Sep 6, 2017
bmf-ribeiro added a commit to bmf-ribeiro/xterm.js that referenced this issue Nov 5, 2017
@bmf-ribeiro bmf-ribeiro mentioned this issue Nov 5, 2017
@Tyriar Tyriar closed this as completed in b7438d5 Nov 6, 2017
Tyriar added a commit that referenced this issue Nov 6, 2017
@Tyriar Tyriar added this to the 3.0.0 milestone Nov 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted type/bug Something is misbehaving
Projects
None yet
Development

No branches or pull requests

2 participants