diff src/search.c @ 1463:e6a8d55a1626 v7.1.178

updated for version 7.1-178
author vimboss
date Tue, 01 Jan 2008 14:43:35 +0000
parents 843bfffb04c7
children 29c09fa57168
line wrap: on
line diff
--- 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;
     }