commit | 9225efbc96378375139fef343f6ee88bc266013c | [log] [tgz] |
---|---|---|
author | Bram Moolenaar <Bram@vim.org> | Mon Jul 30 20:32:53 2007 +0000 |
committer | Bram Moolenaar <Bram@vim.org> | Mon Jul 30 20:32:53 2007 +0000 |
tree | bc4e43bcda9db54591c92167af7141d6a0d04379 | |
parent | 943fae459d1a4aeb750ee2f7d5d7ade642609b4d [diff] [blame] |
updated for version 7.1-046
diff --git a/src/regexp.c b/src/regexp.c index bf0f67a..071663f 100644 --- a/src/regexp.c +++ b/src/regexp.c
@@ -7014,7 +7014,14 @@ #ifdef FEAT_MBYTE if (has_mbyte) { - int l = mb_ptr2len(s) - 1; + int l; + + /* Copy composing characters separately, one + * at a time. */ + if (enc_utf8) + l = utf_ptr2len(s) - 1; + else + l = mb_ptr2len(s) - 1; s += l; len -= l;