updated for version 7.4.050
Problem: "gn" selects too much for the pattern "\d" when there are two
lines with a single digit. (Ryan Carney)
Solution: Adjust the logic of is_one_char(). (Christian Brabandt)
This commit is contained in:
@ -4680,7 +4680,7 @@ is_one_char(pattern)
|
|||||||
&& regmatch.startpos[0].lnum == regmatch.endpos[0].lnum
|
&& regmatch.startpos[0].lnum == regmatch.endpos[0].lnum
|
||||||
&& regmatch.startpos[0].col == regmatch.endpos[0].col);
|
&& regmatch.startpos[0].col == regmatch.endpos[0].col);
|
||||||
|
|
||||||
if (!result && incl(&pos) == 0 && pos.col == regmatch.endpos[0].col)
|
if (!result && inc(&pos) >= 0 && pos.col == regmatch.endpos[0].col)
|
||||||
result = TRUE;
|
result = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -46,6 +46,9 @@ vlgnd
|
|||||||
:set selection=exclusive
|
:set selection=exclusive
|
||||||
$cgNmongoose/i
|
$cgNmongoose/i
|
||||||
cgnj
|
cgnj
|
||||||
|
:" Make sure there is no other match y uppercase.
|
||||||
|
/x59
|
||||||
|
gggnd
|
||||||
:/^start:/,/^end:/wq! test.out
|
:/^start:/,/^end:/wq! test.out
|
||||||
ENDTEST
|
ENDTEST
|
||||||
|
|
||||||
@ -75,4 +78,7 @@ delete first and last chars
|
|||||||
uniquepattern uniquepattern
|
uniquepattern uniquepattern
|
||||||
my very excellent mother just served us nachos
|
my very excellent mother just served us nachos
|
||||||
for (i=0; i<=10; i++)
|
for (i=0; i<=10; i++)
|
||||||
|
Y
|
||||||
|
text
|
||||||
|
Y
|
||||||
end:
|
end:
|
||||||
|
|||||||
@ -27,4 +27,7 @@ elete first and last char
|
|||||||
uniquepattern
|
uniquepattern
|
||||||
my very excellent mongoose just served us nachos
|
my very excellent mongoose just served us nachos
|
||||||
for (j=0; i<=10; i++)
|
for (j=0; i<=10; i++)
|
||||||
|
|
||||||
|
text
|
||||||
|
Y
|
||||||
end:
|
end:
|
||||||
|
|||||||
@ -738,6 +738,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
50,
|
||||||
/**/
|
/**/
|
||||||
49,
|
49,
|
||||||
/**/
|
/**/
|
||||||
|
|||||||
Reference in New Issue
Block a user