summaryrefslogtreecommitdiff
path: root/src/search.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2008-01-01 14:43:35 +0000
committerBram Moolenaar <Bram@vim.org>2008-01-01 14:43:35 +0000
commit78d4abaa9387e8a370394f141ad5c7b2a2b54cc4 (patch)
treed81e3297b694f74431d0fdd4dd06f3516a52c23d /src/search.c
parentee3f7a51c8a2eadde419971cb5a9e01336752a52 (diff)
downloadvim-git-78d4abaa9387e8a370394f141ad5c7b2a2b54cc4.tar.gz
updated for version 7.1-178v7.1.178
Diffstat (limited to 'src/search.c')
-rw-r--r--src/search.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/search.c b/src/search.c
index 58a763114..161117b58 100644
--- a/src/search.c
+++ b/src/search.c
@@ -2319,7 +2319,9 @@ check_linecomment(line)
#endif
while ((p = vim_strchr(p, '/')) != NULL)
{
- if (p[1] == '/')
+ /* accept a double /, unless it's preceded with * and followed by *,
+ * because * / / * is an end and start of a C comment */
+ if (p[1] == '/' && (p == line || p[-1] != '*' || p[2] != '*'))
break;
++p;
}