mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-06 22:05:48 +01:00
rename the char parameter to ch for v.editor.findCharForward and
v.editor.FindCharBackward as "char" is a reserved word
This commit is contained in:
@@ -264,12 +264,12 @@ vimperator.Editor = function () //{{{
|
|||||||
},
|
},
|
||||||
|
|
||||||
// returns the position of char
|
// returns the position of char
|
||||||
findCharForward: function (char, count)
|
findCharForward: function (ch, count)
|
||||||
{
|
{
|
||||||
if (!editor())
|
if (!editor())
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
last_findChar = char;
|
last_findChar = ch;
|
||||||
last_findChar_func = this.findCharForward;
|
last_findChar_func = this.findCharForward;
|
||||||
|
|
||||||
var text = editor().value;
|
var text = editor().value;
|
||||||
@@ -280,7 +280,7 @@ vimperator.Editor = function () //{{{
|
|||||||
{
|
{
|
||||||
if (text[i] == "\n")
|
if (text[i] == "\n")
|
||||||
break;
|
break;
|
||||||
if (text[i] == char)
|
if (text[i] == ch)
|
||||||
count--;
|
count--;
|
||||||
if (count == 0)
|
if (count == 0)
|
||||||
return i + 1; // always position the cursor after the char
|
return i + 1; // always position the cursor after the char
|
||||||
@@ -291,12 +291,12 @@ vimperator.Editor = function () //{{{
|
|||||||
},
|
},
|
||||||
|
|
||||||
// returns the position of char
|
// returns the position of char
|
||||||
findCharBackward: function (char, count)
|
findCharBackward: function (ch, count)
|
||||||
{
|
{
|
||||||
if (!editor())
|
if (!editor())
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
last_findChar = char;
|
last_findChar = ch;
|
||||||
last_findChar_func = this.findCharBackward;
|
last_findChar_func = this.findCharBackward;
|
||||||
|
|
||||||
var text = editor().value;
|
var text = editor().value;
|
||||||
@@ -307,7 +307,7 @@ vimperator.Editor = function () //{{{
|
|||||||
{
|
{
|
||||||
if (text[i] == "\n")
|
if (text[i] == "\n")
|
||||||
break;
|
break;
|
||||||
if (text[i] == char)
|
if (text[i] == ch)
|
||||||
count--;
|
count--;
|
||||||
if (count == 0)
|
if (count == 0)
|
||||||
return i;
|
return i;
|
||||||
|
|||||||
Reference in New Issue
Block a user