aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/regexp_nfa.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/regexp_nfa.c')
-rw-r--r--src/nvim/regexp_nfa.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/nvim/regexp_nfa.c b/src/nvim/regexp_nfa.c
index 484dfe1e1f..4cd422400f 100644
--- a/src/nvim/regexp_nfa.c
+++ b/src/nvim/regexp_nfa.c
@@ -4781,6 +4781,7 @@ static long find_match_text(colnr_T startcol, int regstart, char_u *match_text)
if (match
/* check that no composing char follows */
&& !(enc_utf8
+ && STRLEN(regline) > (size_t)(col + len2)
&& utf_iscomposing(PTR2CHAR(regline + col + len2)))
) {
cleanup_subexpr();