From 9ba970b83dfd0795563bf7104fe2740c246b22ec Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Wed, 11 Sep 2013 00:38:38 -0400 Subject: [PATCH] lookingGlass: Fix newline replacing text.replace() returns the new string as strings in JS are immutable. --- js/ui/lookingGlass.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/ui/lookingGlass.js b/js/ui/lookingGlass.js index 268d45f57..a408628a0 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 == '')