-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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: Fixed issues involving Console History not being capped at specified limit, regarding Issue #10598 #11162
Console: Fixed issues involving Console History not being capped at specified limit, regarding Issue #10598 #11162
Conversation
…trimmed to maximum, Issue was fixed by assigning trimmed array to original array; Signed-off-by: Shehan Atukorala<shehanatuk@gmail.com>
Merging with upstream master branch
…trimmed to maximum limit; this commit addresses changing the limit var back to 50; Signed-off-by: Shehan Atukorala<shehanatuk@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution 👍
In order to accept your changes please be sure to sure to sign the eclipse contributor agreement (eca) with the same email as your authorship.
I have signed the Eclipse Contributor Agreement now. Let me know if I missed anything. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution!
I will @vince-fugnitto have a final look and then we can merge this one!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your first contribution @ShehanAT 👍
What it does
The history of commands typed in the Debug Console in the Debug view(access in the left sidebar of the browser version) was not adhering to the limit specified in the
limit
variable in the file:theia/packages/console/src/browser/console-history.ts
.The main issue was that the newly sliced array(
this.values.slice(index)
) was not being assigned to the original array.Therefore, I replaced that line with the following:
this.values = this.values.slice(index);
in order to resolve this issue.Fixes #10598
How to test
theia/packages/console/src/browser/console-history.ts
limit
variable to a lower number such as3
yarn build browser
then navigate to/examples/browser
and runyarn start
http://localhost:3000
and open theDebug
tab in the left sidebarlimit
variable) in the debug console then press the up arrow to validate that the messages saved conforms to the number assigned to thelimit
variable(Ex:limit = 3
should cap the maximum number of saved commands up to 3)Review checklist
Reminder for reviewers