runDialog: Trim input before processing

This way, whitespace-only (nonempty) input gets the same treatment of
not being added to the history (see previous commit), which seems nice.

Part of 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:41:36 +01:00 committed by Marge Bot
parent cb26a636e8
commit 6ac32f1fc0

View File

@ -178,6 +178,7 @@ class RunDialog extends ModalDialog.ModalDialog {
}
_run(input, inTerminal) {
input = input.trim();
let command = input;
if (input)