runDialog: Don’t add empty input to history

If the input is empty, there’s no point in adding it to the history –
it’ll just be mildly annoying when the user has to skip past it next
time they consult the history.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3183.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1442>
This commit is contained in:
Lucas Werkmeister 2021-02-07 19:38:40 +01:00 committed by Marge Bot
parent 7bea63ae4b
commit cb26a636e8

View File

@ -180,7 +180,8 @@ class RunDialog extends ModalDialog.ModalDialog {
_run(input, inTerminal) {
let command = input;
this._history.addItem(input);
if (input)
this._history.addItem(input);
this._commandError = false;
let f;
if (this._enableInternalCommands)