[gnome-shell] lookingGlass: Fix newline replacing



commit 9ba970b83dfd0795563bf7104fe2740c246b22ec
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Wed Sep 11 00:38:38 2013 -0400

    lookingGlass: Fix newline replacing
    
    text.replace() returns the new string as strings in JS are immutable.

 js/ui/lookingGlass.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/lookingGlass.js b/js/ui/lookingGlass.js
index 268d45f..a408628 100644
--- a/js/ui/lookingGlass.js
+++ b/js/ui/lookingGlass.js
@@ -920,7 +920,7 @@ const LookingGlass = new Lang.Class({
             let text = o.get_text();
             // Ensure we don't get newlines in the command; the history file is
             // newline-separated.
-            text.replace('\n', ' ');
+            text = text.replace('\n', ' ');
             // Strip leading and trailing whitespace
             text = text.replace(/^\s+/g, '').replace(/\s+$/g, '');
             if (text == '')


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