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

Console History is not trimmed to maximum #10598

Closed
JonasHelming opened this issue Jan 5, 2022 · 0 comments · Fixed by #11162
Closed

Console History is not trimmed to maximum #10598

JonasHelming opened this issue Jan 5, 2022 · 0 comments · Fixed by #11162
Assignees
Labels
beginners issues that are perfect for beginners console issues related to the console good first issue good first issues for new contributors hackathon issues reserved for hackatons

Comments

@JonasHelming
Copy link
Contributor

JonasHelming commented Jan 5, 2022

Bug Description:

The history of commands typed in the debug console will not be capped at the intended limit (50), but grows forever).

Steps to Reproduce:

  1. To test, ideally first lower the limit from 50 to something lower, e.g. 3 in:
  2. Open Theia and the debug console.
  3. Execute more commands then the limit (e.g. 4)
  4. Press arrow up and see that more commands than then limit are stored in the history

Additional Information

Looks like the history array is sliced correctly in the trim function, but the return value is ignored. The return value should be assigned to the original array, see

this.values.slice(index);

@JonasHelming JonasHelming added the hackathon issues reserved for hackatons label Jan 5, 2022
@JonasHelming JonasHelming self-assigned this Jan 5, 2022
@vince-fugnitto vince-fugnitto added the console issues related to the console label Jan 5, 2022
@vince-fugnitto vince-fugnitto added beginners issues that are perfect for beginners good first issue good first issues for new contributors labels Mar 18, 2022
ShehanAT added a commit to ShehanAT/theia that referenced this issue May 17, 2022
…trimmed to maximum, Issue was fixed by assigning trimmed array to original array; Signed-off-by: Shehan Atukorala<shehanatuk@gmail.com>
ShehanAT added a commit to ShehanAT/theia that referenced this issue May 17, 2022
…trimmed to maximum limit; this commit addresses changing the limit var back to 50; Signed-off-by: Shehan Atukorala<shehanatuk@gmail.com>
vince-fugnitto pushed a commit that referenced this issue May 17, 2022
The commit fixes #10598 by ensuring that the console history respects the maximum number of entries.
Before the change, the history was not being properly trimmed resulting in the history growing.

Signed-off-by: Shehan Atukorala<shehanatuk@gmail.com>
ShehanAT added a commit to ShehanAT/theia that referenced this issue May 19, 2022
…trimmed to maximum, Issue was fixed by assigning trimmed array to original array; Signed-off-by: Shehan Atukorala<shehanatuk@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beginners issues that are perfect for beginners console issues related to the console good first issue good first issues for new contributors hackathon issues reserved for hackatons
Projects
None yet
2 participants