mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-01 04:15:45 +01:00
minor refactoring of autsizeMultilineInputWidget
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user