diff options
author | Bram Moolenaar <Bram@vim.org> | 2005-12-18 22:10:00 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2005-12-18 22:10:00 +0000 |
commit | e3226be91a18160dcae6aefc240bf1d687bcd2a2 (patch) | |
tree | 038f14a1dc33c2598be03b661a0b7d6194001fca /src/misc1.c | |
parent | d35f9711d4558f8784e65531a152d38d1dabbe72 (diff) | |
download | vim-e3226be91a18160dcae6aefc240bf1d687bcd2a2.zip |
updated for version 7.0173
Diffstat (limited to 'src/misc1.c')
-rw-r--r-- | src/misc1.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/misc1.c b/src/misc1.c index cd8acceaa..85b81fd4a 100644 --- a/src/misc1.c +++ b/src/misc1.c @@ -2110,7 +2110,7 @@ del_char(fixpos) return del_chars(1L, fixpos); } #endif - return del_bytes(1L, fixpos); + return del_bytes(1L, fixpos, TRUE); } #if defined(FEAT_MBYTE) || defined(PROTO) @@ -2134,7 +2134,7 @@ del_chars(count, fixpos) bytes += l; p += l; } - return del_bytes(bytes, fixpos); + return del_bytes(bytes, fixpos, TRUE); } #endif @@ -2146,9 +2146,10 @@ del_chars(count, fixpos) * return FAIL for failure, OK otherwise */ int -del_bytes(count, fixpos) +del_bytes(count, fixpos, use_delcombine) long count; int fixpos; + int use_delcombine; /* 'delcombine' option applies */ { char_u *oldp, *newp; colnr_T oldlen; @@ -2169,7 +2170,8 @@ del_bytes(count, fixpos) #ifdef FEAT_MBYTE /* If 'delcombine' is set and deleting (less than) one character, only * delete the last combining character. */ - if (p_deco && enc_utf8 && utfc_ptr2len(oldp + col) >= count) + if (p_deco && use_delcombine && enc_utf8 + && utfc_ptr2len(oldp + col) >= count) { int c1, c2; int n; |