0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

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;

View File

@ -184,6 +184,7 @@ NEW_TESTS = test_arglist.res \
test_syntax.res \
test_viminfo.res \
test_viml.res \
test_visual.res \
test_alot.res

View File

@ -743,6 +743,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1491,
/**/
1490,
/**/