1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-03-01 06:05:51 +01:00

minor refactoring of autsizeMultilineInputWidget

This commit is contained in:
Doug Kearns
2008-09-18 08:40:33 +00:00
parent 3db8c98e06
commit 597468f179

View File

@@ -236,11 +236,7 @@ liberator.CommandLine = function () //{{{
function autosizeMultilineInputWidget() function autosizeMultilineInputWidget()
{ {
var lines = 0; let lines = multilineInputWidget.value.split("\n").length - 1;
var str = multilineInputWidget.value;
for (var i = 0; i < str.length; i++)
if (str[i] == "\n")
lines++;
if (lines == 0) if (lines == 0)
lines = 1; lines = 1;