1
0
forked from aniani/vim

updated for version 7.4.559

Problem:    Appending a block in the middle of a tab does not work correctly
            when virtualedit is set.
Solution:   Decrement spaces and count, don't reset them. (James McCoy)
This commit is contained in:
Bram Moolenaar
2014-12-17 18:35:42 +01:00
parent 527a6785c7
commit fc3f23bedf
4 changed files with 14 additions and 9 deletions

View File

@@ -612,20 +612,20 @@ block_insert(oap, s, b_insert, bdp)
#ifdef FEAT_MBYTE
if (has_mbyte && spaces > 0)
{
int off;
/* Avoid starting halfway a multi-byte character. */
if (b_insert)
{
int off = (*mb_head_off)(oldp, oldp + offset + spaces);
spaces -= off;
count -= off;
off = (*mb_head_off)(oldp, oldp + offset + spaces);
}
else
{
int off = (*mb_off_next)(oldp, oldp + offset);
off = (*mb_off_next)(oldp, oldp + offset);
offset += off;
spaces = 0;
count = 0;
}
spaces -= off;
count -= off;
}
#endif