aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZyX <kp-pav@yandex.ru>2017-04-16 21:41:55 +0300
committerZyX <kp-pav@yandex.ru>2017-04-16 21:43:27 +0300
commit372b6af8ea09bced16e8c793cbab304d2393bfa6 (patch)
treeb407ee91cd16430ce425ce2c46a70b5363961c91
parent30561afe4128ab0c5371af00641d5c5a682d6270 (diff)
downloadrneovim-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.c11
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;
}