]> granicus.if.org Git - vim/commitdiff
Fix: changing case of a character removed combining characters.
authorBram Moolenaar <Bram@vim.org>
Sun, 1 Aug 2010 12:22:48 +0000 (14:22 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 1 Aug 2010 12:22:48 +0000 (14:22 +0200)
src/ops.c

index beab33c1591b3258c7564524b281e11a79d099a4..98bd2d171aa7f54cc12255c87882a9d1502326bb 100644 (file)
--- a/src/ops.c
+++ b/src/ops.c
@@ -2433,7 +2433,8 @@ swapchar(op_type, pos)
            pos_T   sp = curwin->w_cursor;
 
            curwin->w_cursor = *pos;
-           del_char(FALSE);
+           /* don't use del_char(), it also removes composing chars */
+           del_bytes(utf_ptr2len(ml_get_cursor()), FALSE, FALSE);
            ins_char(nc);
            curwin->w_cursor = sp;
        }