[gnome-shell] runDialog: Don’t add empty input to history



commit cb26a636e8c2981a1ddba3011c2509f68c025f32
Author: Lucas Werkmeister <mail lucaswerkmeister de>
Date:   Sun Feb 7 19:38:40 2021 +0100

    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>

 js/ui/runDialog.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/js/ui/runDialog.js b/js/ui/runDialog.js
index 114aa1b265..b847f0d11b 100644
--- a/js/ui/runDialog.js
+++ b/js/ui/runDialog.js
@@ -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)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]