aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/regexp_nfa.c
diff options
context:
space:
mode:
authorckelsel <ckelsel@hotmail.com>2017-08-12 08:28:10 +0800
committerckelsel <ckelsel@hotmail.com>2017-08-12 08:28:10 +0800
commitd59e9a2c25c563e3460b1eeb31ab4d5971097331 (patch)
tree26f42a8d349db94f9faf87846aaae116582a76e7 /src/nvim/regexp_nfa.c
parent9a5d309b5743d70832b4daedcea934af5e6cc127 (diff)
parentf2fd5afb48786c4272105b0adda6977ee1fd6f2e (diff)
downloadrneovim-d59e9a2c25c563e3460b1eeb31ab4d5971097331.tar.gz
rneovim-d59e9a2c25c563e3460b1eeb31ab4d5971097331.tar.bz2
rneovim-d59e9a2c25c563e3460b1eeb31ab4d5971097331.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'src/nvim/regexp_nfa.c')
-rw-r--r--src/nvim/regexp_nfa.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/nvim/regexp_nfa.c b/src/nvim/regexp_nfa.c
index 5d708febea..93ba9ce097 100644
--- a/src/nvim/regexp_nfa.c
+++ b/src/nvim/regexp_nfa.c
@@ -56,13 +56,13 @@ enum {
NFA_RANGE_MIN, /* low end of a range */
NFA_RANGE_MAX, /* high end of a range */
- NFA_CONCAT, /* concatenate two previous items (postfix
- * only) */
- NFA_OR, /* \| (postfix only) */
- NFA_STAR, /* greedy * (posfix only) */
- NFA_STAR_NONGREEDY, /* non-greedy * (postfix only) */
- NFA_QUEST, /* greedy \? (postfix only) */
- NFA_QUEST_NONGREEDY, /* non-greedy \? (postfix only) */
+ NFA_CONCAT, // concatenate two previous items (postfix
+ // only)
+ NFA_OR, // \| (postfix only)
+ NFA_STAR, // greedy * (postfix only)
+ NFA_STAR_NONGREEDY, // non-greedy * (postfix only)
+ NFA_QUEST, // greedy \? (postfix only)
+ NFA_QUEST_NONGREEDY, // non-greedy \? (postfix only)
NFA_BOL, /* ^ Begin line */
NFA_EOL, /* $ End line */
@@ -1988,7 +1988,7 @@ static int nfa_regpiece(void)
// The engine is very inefficient (uses too many states) when the maximum
// is much larger than the minimum and when the maximum is large. Bail out
// if we can use the other engine.
- if ((nfa_re_flags & RE_AUTO) && (maxval > minval + 200 || maxval > 500)) {
+ if ((nfa_re_flags & RE_AUTO) && (maxval > 500 || maxval > minval + 200)) {
return FAIL;
}