mirror of
https://github.com/xibyte/jsketcher
synced 2026-01-06 07:44:50 +01:00
don't put a command on history if it's the same command as last one
This commit is contained in:
parent
a44e6b3f41
commit
7bab2f0fa7
1 changed files with 3 additions and 1 deletions
|
|
@ -456,7 +456,9 @@ function Terminal(win, commandProcessor, variantsSupplier) {
|
|||
if (command != null && command.trim().length != 0) {
|
||||
var result = commandProcessor(command);
|
||||
out.append($('<div>', {text: result, 'class': 'terminal-commandResult'}));
|
||||
this.history.push(command);
|
||||
if (this.history.length == 0 || command != this.history[this.history.length - 1]) {
|
||||
this.history.push(command);
|
||||
}
|
||||
this.historyPointer = this.history.length;
|
||||
}
|
||||
out.parent().scrollTop(out.height());
|
||||
|
|
|
|||
Loading…
Reference in a new issue