mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-10-17 02:32:32 +02:00
minor refactoring of autsizeMultilineInputWidget
This commit is contained in:
1 parent
3db8c98e06
commit
597468f179
1 file changed
+1
-5
+1
-5
@@ -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