updated for version 7.3.1119
Problem: Flags in 'cpo' are search for several times.
Solution: Store the result and re-use the flags.
diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c
index 475b629..4dea47c 100644
--- a/src/regexp_nfa.c
+++ b/src/regexp_nfa.c
@@ -686,13 +686,8 @@
int startc = -1;
int endc = -1;
int oldstartc = -1;
- int cpo_lit; /* 'cpoptions' contains 'l' flag */
- int cpo_bsl; /* 'cpoptions' contains '\' flag */
int glue; /* ID that will "glue" nodes together */
- cpo_lit = vim_strchr(p_cpo, CPO_LITERAL) != NULL;
- cpo_bsl = vim_strchr(p_cpo, CPO_BACKSL) != NULL;
-
c = getchr();
switch (c)
{
@@ -1224,10 +1219,10 @@
* Posix doesn't recognize backslash at all.
*/
if (*regparse == '\\'
- && !cpo_bsl
+ && !reg_cpo_bsl
&& regparse + 1 <= endp
&& (vim_strchr(REGEXP_INRANGE, regparse[1]) != NULL
- || (!cpo_lit
+ || (!reg_cpo_lit
&& vim_strchr(REGEXP_ABBR, regparse[1])
!= NULL)
)