lookingGlass: Fix newline replacing
text.replace() returns the new string as strings in JS are immutable.
This commit is contained in:
parent
954d262d67
commit
9ba970b83d
@ -920,7 +920,7 @@ const LookingGlass = new Lang.Class({
|
|||||||
let text = o.get_text();
|
let text = o.get_text();
|
||||||
// Ensure we don't get newlines in the command; the history file is
|
// Ensure we don't get newlines in the command; the history file is
|
||||||
// newline-separated.
|
// newline-separated.
|
||||||
text.replace('\n', ' ');
|
text = text.replace('\n', ' ');
|
||||||
// Strip leading and trailing whitespace
|
// Strip leading and trailing whitespace
|
||||||
text = text.replace(/^\s+/g, '').replace(/\s+$/g, '');
|
text = text.replace(/^\s+/g, '').replace(/\s+$/g, '');
|
||||||
if (text == '')
|
if (text == '')
|
||||||
|
Loading…
Reference in New Issue
Block a user