[runDialog] Don't add duplicates to the history
When the user runs the same command as the last one saved there is no need to save it again, otherwise we the history might end up having lots of dupes which makes searching for an old command harder. https://bugzilla.gnome.org/show_bug.cgi?id=613731
This commit is contained in:
parent
14a53cc43c
commit
aefa8af60e
@ -330,8 +330,10 @@ RunDialog.prototype = {
|
||||
_run : function(input, inTerminal) {
|
||||
let command = input;
|
||||
|
||||
if (this._history.length > 0 && this._history[this._history.length - 1] != input) {
|
||||
this._history.push(input);
|
||||
this._saveHistory();
|
||||
}
|
||||
|
||||
this._commandError = false;
|
||||
let f;
|
||||
|
Loading…
Reference in New Issue
Block a user