console: fix command history behavior and increase history size
This commit is contained in:
parent
241f36d499
commit
ba08aa628e
2 changed files with 3 additions and 2 deletions
|
|
@ -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 = ''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue