mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
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:
parent
527a6785c7
commit
fc3f23bedf
12
src/ops.c
12
src/ops.c
@ -612,20 +612,20 @@ block_insert(oap, s, b_insert, bdp)
|
|||||||
#ifdef FEAT_MBYTE
|
#ifdef FEAT_MBYTE
|
||||||
if (has_mbyte && spaces > 0)
|
if (has_mbyte && spaces > 0)
|
||||||
{
|
{
|
||||||
|
int off;
|
||||||
|
|
||||||
/* Avoid starting halfway a multi-byte character. */
|
/* Avoid starting halfway a multi-byte character. */
|
||||||
if (b_insert)
|
if (b_insert)
|
||||||
{
|
{
|
||||||
int off = (*mb_head_off)(oldp, oldp + offset + spaces);
|
off = (*mb_head_off)(oldp, oldp + offset + spaces);
|
||||||
spaces -= off;
|
|
||||||
count -= off;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int off = (*mb_off_next)(oldp, oldp + offset);
|
off = (*mb_off_next)(oldp, oldp + offset);
|
||||||
offset += off;
|
offset += off;
|
||||||
spaces = 0;
|
|
||||||
count = 0;
|
|
||||||
}
|
}
|
||||||
|
spaces -= off;
|
||||||
|
count -= off;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -38,11 +38,14 @@ G$khhhhhkkcmno
|
|||||||
/^C23$/
|
/^C23$/
|
||||||
:exe ":norm! l\<C-V>j$hhAab\<Esc>"
|
:exe ":norm! l\<C-V>j$hhAab\<Esc>"
|
||||||
:.,/^$/w >> test.out
|
:.,/^$/w >> test.out
|
||||||
:" Test for Visual block insert when virtualedit=all
|
:" Test for Visual block insert when virtualedit=all and utf-8 encoding
|
||||||
:set ve=all
|
:set ve=all enc=utf-8
|
||||||
:/\t\tline
|
:/\t\tline
|
||||||
:exe ":norm! 07l\<C-V>jjIx\<Esc>"
|
: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
|
:.,/^$/w >> test.out
|
||||||
:" gUe must uppercase a whole word, also when ß changes to SS
|
:" gUe must uppercase a whole word, also when ß changes to SS
|
||||||
Gothe youtußeuu endYpk0wgUe
|
Gothe youtußeuu endYpk0wgUe
|
||||||
|
Binary file not shown.
@ -741,6 +741,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
559,
|
||||||
/**/
|
/**/
|
||||||
558,
|
558,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user