From 597468f17982d67f001efda6269370f2b335afda Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Thu, 18 Sep 2008 08:40:33 +0000 Subject: [PATCH] minor refactoring of autsizeMultilineInputWidget --- content/ui.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/content/ui.js b/content/ui.js index e5ce37e7..61bb143a 100644 --- a/content/ui.js +++ b/content/ui.js @@ -236,11 +236,7 @@ liberator.CommandLine = function () //{{{ function autosizeMultilineInputWidget() { - var lines = 0; - var str = multilineInputWidget.value; - for (var i = 0; i < str.length; i++) - if (str[i] == "\n") - lines++; + let lines = multilineInputWidget.value.split("\n").length - 1; if (lines == 0) lines = 1;