Skip to content

Commit f3d6f0b

Browse files
committed
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)
1 parent 4b5a527 commit f3d6f0b

File tree

4 files changed

+13
-2
lines changed

4 files changed

+13
-2
lines changed

src/search.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4680,8 +4680,8 @@ is_one_char(pattern)
46804680
&& regmatch.startpos[0].lnum == regmatch.endpos[0].lnum
46814681
&& regmatch.startpos[0].col == regmatch.endpos[0].col);
46824682

4683-
if (!result && incl(&pos) == 0 && pos.col == regmatch.endpos[0].col)
4684-
result = TRUE;
4683+
if (!result && inc(&pos) >= 0 && pos.col == regmatch.endpos[0].col)
4684+
result = TRUE;
46854685
}
46864686

46874687
called_emsg |= save_called_emsg;

src/testdir/test53.in

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ vlgnd
4646
:set selection=exclusive
4747
$cgNmongoose/i
4848
cgnj
49+
:" Make sure there is no other match y uppercase.
50+
/x59
51+
gggnd
4952
:/^start:/,/^end:/wq! test.out
5053
ENDTEST
5154

@@ -75,4 +78,7 @@ delete first and last chars
7578
uniquepattern uniquepattern
7679
my very excellent mother just served us nachos
7780
for (i=0; i<=10; i++)
81+
Y
82+
text
83+
Y
7884
end:

src/testdir/test53.ok

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,7 @@ elete first and last char
2727
uniquepattern
2828
my very excellent mongoose just served us nachos
2929
for (j=0; i<=10; i++)
30+
31+
text
32+
Y
3033
end:

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,8 @@ static char *(features[]) =
738738

739739
static int included_patches[] =
740740
{ /* Add new patch number below this line */
741+
/**/
742+
50,
741743
/**/
742744
49,
743745
/**/

0 commit comments

Comments
 (0)