mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
[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
1 changed files with 4 additions and 2 deletions
|
|
@ -330,8 +330,10 @@ RunDialog.prototype = {
|
|||
_run : function(input, inTerminal) {
|
||||
let command = input;
|
||||
|
||||
this._history.push(input);
|
||||
this._saveHistory();
|
||||
if (this._history.length > 0 && this._history[this._history.length - 1] != input) {
|
||||
this._history.push(input);
|
||||
this._saveHistory();
|
||||
}
|
||||
|
||||
this._commandError = false;
|
||||
let f;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue