Skip to content

Commit 7d1f724

Browse files
authored
console: respect maximum console history (#11162)
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<[email protected]>
1 parent 9b8bc9e commit 7d1f724

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44

55
- [Previous Changelogs](https://github.com/eclipse-theia/theia/tree/master/doc/changelogs/)
66

7+
78
## v.1.26.0
89

910
- [plugin] Introduce `DebugSession#workspaceFolder` [#11090](https://github.com/eclipse-theia/theia/pull/11090) - Contributed on behalf of STMicroelectronics
11+
- [console] fixed issue in Debug console where console history was not being trimmed in accordance with the maximum commands limit [#10598](https://github.com/eclipse-theia/theia/pull/10598)
1012

1113
## v1.25.0 - 4/28/2022
1214

packages/console/src/browser/console-history.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export class ConsoleHistory {
3939
protected trim(): void {
4040
const index = this.values.length - ConsoleHistory.limit;
4141
if (index > 0) {
42-
this.values.slice(index);
42+
this.values = this.values.slice(index);
4343
}
4444
}
4545

0 commit comments

Comments
 (0)