diff options
author | Bram Moolenaar <Bram@vim.org> | 2013-06-05 12:43:09 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2013-06-05 12:43:09 +0200 |
commit | 1cd3f2c4507ad242a6ed50270009f19fa49e5a7b (patch) | |
tree | 6650142d4b9105920890ac38612fba2b7c88a609 /src/regexp_nfa.c | |
parent | e2b8cb3b15c47107c1b05d698ce267ed1ea05079 (diff) | |
download | vim-git-1cd3f2c4507ad242a6ed50270009f19fa49e5a7b.tar.gz |
updated for version 7.3.1119v7.3.1119
Problem: Flags in 'cpo' are search for several times.
Solution: Store the result and re-use the flags.
Diffstat (limited to 'src/regexp_nfa.c')
-rw-r--r-- | src/regexp_nfa.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c index 475b62911..4dea47c77 100644 --- a/src/regexp_nfa.c +++ b/src/regexp_nfa.c @@ -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) ) |