diff --git a/CHANGELOG.md b/CHANGELOG.md index 69dd790c..2604bac3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - sliders: ignore key order in `range` - sliders: handle mousewheel increment when starting from a value between two steps with `steps` property defined - inspector: allow scrolling in the help modal + - console: fix command history behavior and increase history size - widgets - encoder: expose angle in script (as `locals.angle`) diff --git a/src/client/ui/ui-console.js b/src/client/ui/ui-console.js index 44f0bc57..a09b9177 100644 --- a/src/client/ui/ui-console.js +++ b/src/client/ui/ui-console.js @@ -124,9 +124,9 @@ class UiConsole extends UiSidePanel { this.log('output value', returnValue) } - if (this.input.value !== this.history[this.cursor] && this.input.value !== this.history[1]) { + if (this.input.value !== this.history[1]) { this.history.splice(1, 0, this.input.value) - if (this.history.length > 10) this.history.pop() + if (this.history.length > 50) this.history.pop() } this.input.value = ''