diff src/eval.c @ 1523:dfcff6590aba v7.1.238

updated for version 7.1-238
author vimboss
date Tue, 22 Jan 2008 10:59:38 +0000
parents 1b55bbf5c580
children 8abc0abf8cbd
line wrap: on
line diff
--- a/src/eval.c
+++ b/src/eval.c
@@ -14189,6 +14189,10 @@ searchpair_cmn(argvars, match_pos)
 	goto theend;
     }
 
+    /* Using 'r' implies 'W', otherwise it doesn't work. */
+    if (flags & SP_REPEAT)
+	p_ws = FALSE;
+
     /* Optional fifth argument: skip expression */
     if (argvars[3].v_type == VAR_UNKNOWN
 	    || argvars[4].v_type == VAR_UNKNOWN)
@@ -14345,6 +14349,9 @@ do_searchpair(spat, mpat, epat, dir, ski
 	}
 	foundpos = pos;
 
+	/* clear the start flag to avoid getting stuck here */
+	options &= ~SEARCH_START;
+
 	/* If the skip pattern matches, ignore this match. */
 	if (*skip != NUL)
 	{