summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ops.c12
-rw-r--r--src/testdir/test39.in9
-rw-r--r--src/testdir/test39.okbin514 -> 584 bytes
-rw-r--r--src/version.c2
4 files changed, 14 insertions, 9 deletions
diff --git a/src/ops.c b/src/ops.c
index edc84a07a..0db8c2d25 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -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
diff --git a/src/testdir/test39.in b/src/testdir/test39.in
index 410dea61a..c4e46fff2 100644
--- a/src/testdir/test39.in
+++ b/src/testdir/test39.in
@@ -38,11 +38,14 @@ G$khhhhhkkcmno
/^C23$/
:exe ":norm! l\<C-V>j$hhAab\<Esc>"
:.,/^$/w >> test.out
-:" Test for Visual block insert when virtualedit=all
-:set ve=all
+:" Test for Visual block insert when virtualedit=all and utf-8 encoding
+:set ve=all enc=utf-8
:/\t\tline
:exe ":norm! 07l\<C-V>jjIx\<Esc>"
-:set ve=
+:.,/^$/w >> test.out
+:" Test for Visual block append when virtualedit=all
+:exe ":norm! 012l\<C-v>jjAx\<Esc>"
+:set ve= enc=latin1
:.,/^$/w >> test.out
:" gUe must uppercase a whole word, also when ß changes to SS
Gothe youtußeuu endYpk0wgUe
diff --git a/src/testdir/test39.ok b/src/testdir/test39.ok
index d8e901563..5c517e222 100644
--- a/src/testdir/test39.ok
+++ b/src/testdir/test39.ok
Binary files differ
diff --git a/src/version.c b/src/version.c
index 4efee6ae8..e2ac04052 100644
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 559,
+/**/
558,
/**/
557,