diff options
author | Bram Moolenaar <Bram@vim.org> | 2007-07-30 20:32:53 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2007-07-30 20:32:53 +0000 |
commit | 9225efbc96378375139fef343f6ee88bc266013c (patch) | |
tree | bc4e43bcda9db54591c92167af7141d6a0d04379 /src/regexp.c | |
parent | 943fae459d1a4aeb750ee2f7d5d7ade642609b4d (diff) | |
download | vim-git-9225efbc96378375139fef343f6ee88bc266013c.tar.gz |
updated for version 7.1-046v7.1.046
Diffstat (limited to 'src/regexp.c')
-rw-r--r-- | src/regexp.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/regexp.c b/src/regexp.c index bf0f67a03..071663f66 100644 --- a/src/regexp.c +++ b/src/regexp.c @@ -7014,7 +7014,14 @@ vim_regsub_both(source, dest, copy, magic, backslash) #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; |