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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user