summaryrefslogtreecommitdiff
path: root/src/search.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-10-02 21:55:02 +0200
committerBram Moolenaar <Bram@vim.org>2013-10-02 21:55:02 +0200
commit4c7cb6b88446fef3660bceaf465419b3c3958f54 (patch)
tree3fe237ff90a0e39b6a56dd8e6b3677600937e3de /src/search.c
parent3eead7c227e96f416e62214a3529ad1e8b1c8421 (diff)
downloadvim-4c7cb6b88446fef3660bceaf465419b3c3958f54.zip
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)
Diffstat (limited to 'src/search.c')
-rw-r--r--src/search.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/search.c b/src/search.c
index da7bc2961..5d02dd9e3 100644
--- 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;