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

updated for version 7.4.408

Problem:    Visual block insert breaks a multi-byte character.
Solution:   Calculate the position properly. (Yasuhiro Matsumoto)
This commit is contained in:
Bram Moolenaar 2014-08-16 18:36:43 +02:00
parent 1fc7e972b0
commit b5cf6c34e8
8 changed files with 55 additions and 26 deletions

View File

@ -609,6 +609,26 @@ block_insert(oap, s, b_insert, bdp)
}
}
#ifdef FEAT_MBYTE
if (has_mbyte && spaces > 0)
{
/* Avoid starting halfway a multi-byte character. */
if (b_insert)
{
int off = (*mb_head_off)(oldp, oldp + offset + spaces);
spaces -= off;
count -= off;
}
else
{
int off = (*mb_off_next)(oldp, oldp + offset);
offset += off;
spaces = 0;
count = 0;
}
}
#endif
newp = alloc_check((unsigned)(STRLEN(oldp)) + s_len + count + 1);
if (newp == NULL)
continue;

View File

@ -38,13 +38,14 @@ SCRIPTS = test1.out test3.out test4.out test5.out test6.out \
test104.out test105.out test106.out test107.out \
test_autoformat_join.out \
test_breakindent.out \
test_listlbr.out \
test_listlbr_utf8.out \
test_qf_title.out \
test_changelist.out \
test_eval.out \
test_insertcount.out \
test_options.out
test_listlbr.out \
test_listlbr_utf8.out \
test_options.out \
test_qf_title.out \
test_utf8.out
.SUFFIXES: .in .out
@ -170,10 +171,11 @@ test106.out: test106.in
test107.out: test107.in
test_autoformat_join.out: test_autoformat_join.in
test_breakindent.out: test_breakindent.in
test_listlbr.out: test_listlbr.in
test_listlbr_utf8.out: test_listlbr_utf8.in
test_qf_title.out: test_qf_title.in
test_changelist.out: test_changelist.in
test_eval.out: test_eval.in
test_insertcount.out: test_insertcount.in
test_listlbr.out: test_listlbr.in
test_listlbr_utf8.out: test_listlbr_utf8.in
test_options.out: test_options.in
test_qf_title.out: test_qf_title.in
test_utf8.out: test_utf8.in

View File

@ -37,13 +37,14 @@ SCRIPTS = test3.out test4.out test5.out test6.out test7.out \
test105.out test106.out test107.out\
test_autoformat_join.out \
test_breakindent.out \
test_listlbr.out \
test_listlbr_utf8.out \
test_qf_title.out \
test_changelist.out \
test_eval.out \
test_insertcount.out \
test_options.out
test_listlbr.out \
test_listlbr_utf8.out \
test_options.out \
test_qf_title.out \
test_utf8.out
SCRIPTS32 = test50.out test70.out

View File

@ -57,13 +57,14 @@ SCRIPTS = test3.out test4.out test5.out test6.out test7.out \
test105.out test106.out test107.out \
test_autoformat_join.out \
test_breakindent.out \
test_listlbr.out \
test_listlbr_utf8.out \
test_qf_title.out \
test_changelist.out \
test_eval.out \
test_insertcount.out \
test_options.out
test_listlbr.out \
test_listlbr_utf8.out \
test_options.out \
test_qf_title.out \
test_utf8.out
SCRIPTS32 = test50.out test70.out

View File

@ -38,14 +38,15 @@ SCRIPTS = test1.out test3.out test4.out test5.out test6.out \
test100.out test101.out test102.out test103.out test104.out \
test105.out test106.out test107.out \
test_autoformat_join.out \
test_breakindent.out \
test_changelist.out \
test_eval.out \
test_insertcount.out \
test_breakindent.out \
test_listlbr.out \
test_listlbr_utf8.out \
test_options.out \
test_qf_title.out \
test_options.out
test_utf8.out
.SUFFIXES: .in .out

View File

@ -4,7 +4,7 @@
# Authors: Zoltan Arpadffy, <arpadffy@polarhome.com>
# Sandor Kopanyi, <sandor.kopanyi@mailbox.hu>
#
# Last change: 2014 Jul 30
# Last change: 2014 Aug 16
#
# This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
# Edit the lines in the Configuration section below to select.
@ -98,13 +98,14 @@ SCRIPT = test1.out test2.out test3.out test4.out test5.out \
test105.out test106.out test107.out \
test_autoformat_join.out \
test_breakindent.out \
test_listlbr.out \
test_listlbr_utf8.out \
test_qf_title.out \
test_changelist.out \
test_eval.out \
test_insertcount.out \
test_options.out
test_listlbr.out \
test_listlbr_utf8.out \
test_options.out \
test_qf_title.out \
test_utf8.out
# Known problems:
# test17: ?

View File

@ -35,13 +35,14 @@ SCRIPTS = test1.out test2.out test3.out test4.out test5.out test6.out \
test104.out test105.out test106.out test107.out \
test_autoformat_join.out \
test_breakindent.out \
test_listlbr.out \
test_listlbr_utf8.out \
test_qf_title.out \
test_changelist.out \
test_eval.out \
test_insertcount.out \
test_options.out
test_listlbr.out \
test_listlbr_utf8.out \
test_options.out \
test_qf_title.out \
test_utf8.out
SCRIPTS_GUI = test16.out

View File

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