[gnome-shell] runDialog: Trim input before processing



commit 6ac32f1fc0c0c5fce3e6de0fce1812ec8d283bbb
Author: Lucas Werkmeister <mail lucaswerkmeister de>
Date:   Sun Feb 7 19:41:36 2021 +0100

    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>

 js/ui/runDialog.js | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/js/ui/runDialog.js b/js/ui/runDialog.js
index b847f0d11b..a01af5c9d5 100644
--- a/js/ui/runDialog.js
+++ b/js/ui/runDialog.js
@@ -178,6 +178,7 @@ class RunDialog extends ModalDialog.ModalDialog {
     }
 
     _run(input, inTerminal) {
+        input = input.trim();
         let command = input;
 
         if (input)


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