1
0
forked from aniani/vim

updated for version 7.3.1119

Problem:    Flags in 'cpo' are search for several times.
Solution:   Store the result and re-use the flags.
This commit is contained in:
Bram Moolenaar
2013-06-05 12:43:09 +02:00
parent e2b8cb3b15
commit 1cd3f2c450
3 changed files with 23 additions and 22 deletions

View File

@@ -686,13 +686,8 @@ nfa_regatom()
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 @@ collection:
* 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)
)