diff options
author | ZyX <kp-pav@yandex.ru> | 2017-04-16 21:41:55 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2017-04-16 21:43:27 +0300 |
commit | 372b6af8ea09bced16e8c793cbab304d2393bfa6 (patch) | |
tree | b407ee91cd16430ce425ce2c46a70b5363961c91 | |
parent | 30561afe4128ab0c5371af00641d5c5a682d6270 (diff) | |
download | rneovim-372b6af8ea09bced16e8c793cbab304d2393bfa6.tar.gz rneovim-372b6af8ea09bced16e8c793cbab304d2393bfa6.tar.bz2 rneovim-372b6af8ea09bced16e8c793cbab304d2393bfa6.zip |
regexp_nfa: Remove another has_mbyte/…-checking code
-rw-r--r-- | src/nvim/regexp_nfa.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/nvim/regexp_nfa.c b/src/nvim/regexp_nfa.c index caf26fdd35..67a405daf5 100644 --- a/src/nvim/regexp_nfa.c +++ b/src/nvim/regexp_nfa.c @@ -2772,15 +2772,10 @@ static int nfa_max_width(nfa_state_T *startstate, int depth) case NFA_ANY: case NFA_START_COLL: case NFA_START_NEG_COLL: - /* matches some character, including composing chars */ - if (enc_utf8) - len += MB_MAXBYTES; - else if (has_mbyte) - len += 2; - else - ++len; + // Matches some character, including composing chars. + len += MB_MAXBYTES; if (state->c != NFA_ANY) { - /* skip over the characters */ + // Skip over the characters. state = state->out1->out; continue; } |