1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-28 08:05:46 +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()
{
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;