1
0
forked from aniani/vim

patch 7.4.1491

Problem:    Visual-block shift breaks multi-byte characters.
Solution:   Compute column differently. (Yasuhiro Matsumoto) Add a test.
This commit is contained in:
Bram Moolenaar
2016-03-05 17:25:39 +01:00
parent 2369c15407
commit 20b4f463f4
3 changed files with 12 additions and 1 deletions

View File

@@ -410,7 +410,15 @@ shift_block(oparg_T *oap, int amount)
{
#ifdef FEAT_MBYTE
if (has_mbyte)
bd.textstart += (*mb_ptr2len)(bd.textstart);
{
if ((*mb_ptr2len)(bd.textstart) == 1)
++bd.textstart;
else
{
ws_vcol = 0;
bd.startspaces = 0;
}
}
else
#endif
++bd.textstart;