Mercurial > vim
changeset 5398:eb33cadafcab v7.4.050
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)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Wed, 02 Oct 2013 21:55:02 +0200 |
parents | 20068068e3f9 |
children | ecd08086e203 |
files | src/search.c src/testdir/test53.in src/testdir/test53.ok src/version.c |
diffstat | 4 files changed, 13 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/search.c +++ b/src/search.c @@ -4680,8 +4680,8 @@ is_one_char(pattern) && regmatch.startpos[0].lnum == regmatch.endpos[0].lnum && regmatch.startpos[0].col == regmatch.endpos[0].col); - if (!result && incl(&pos) == 0 && pos.col == regmatch.endpos[0].col) - result = TRUE; + if (!result && inc(&pos) >= 0 && pos.col == regmatch.endpos[0].col) + result = TRUE; } called_emsg |= save_called_emsg;
--- a/src/testdir/test53.in +++ b/src/testdir/test53.in @@ -46,6 +46,9 @@ vlgnd :set selection=exclusive $cgNmongoose/i cgnj +:" Make sure there is no other match y uppercase. +/x59 +gggnd :/^start:/,/^end:/wq! test.out ENDTEST @@ -75,4 +78,7 @@ delete first and last chars uniquepattern uniquepattern my very excellent mother just served us nachos for (i=0; i<=10; i++) +Y +text +Y end: