forked from aniani/vim
patch 7.4.818
Problem: 'linebreak' breaks c% if the last Visual selection was block. (Chris Morganiser, Issue 389) Solution: Handle Visual block mode differently. (Christian Brabandt)
This commit is contained in:
parent
2288afed42
commit
89c17c02ca
@ -9583,20 +9583,21 @@ nv_cursorhold(cap)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* calculate start/end virtual columns for operating in block mode
|
* Calculate start/end virtual columns for operating in block mode.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
get_op_vcol(oap, redo_VIsual_vcol, initial)
|
get_op_vcol(oap, redo_VIsual_vcol, initial)
|
||||||
oparg_T *oap;
|
oparg_T *oap;
|
||||||
colnr_T redo_VIsual_vcol;
|
colnr_T redo_VIsual_vcol;
|
||||||
int initial; /* when true: adjust position for 'selectmode' */
|
int initial; /* when TRUE adjust position for 'selectmode' */
|
||||||
{
|
{
|
||||||
colnr_T start, end;
|
colnr_T start, end;
|
||||||
|
|
||||||
if (VIsual_mode != Ctrl_V)
|
if (VIsual_mode != Ctrl_V
|
||||||
|
|| (!initial && oap->end.col < W_WIDTH(curwin)))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
oap->block_mode = TRUE;
|
oap->block_mode = VIsual_active;
|
||||||
|
|
||||||
#ifdef FEAT_MBYTE
|
#ifdef FEAT_MBYTE
|
||||||
/* prevent from moving onto a trail byte */
|
/* prevent from moving onto a trail byte */
|
||||||
|
@ -80,6 +80,13 @@ Go
|
|||||||
aaa
|
aaa
|
||||||
aaa
|
aaa
|
||||||
a2k2j~e.
|
a2k2j~e.
|
||||||
|
:let g:test ="Test 10: using normal commands after block-visual"
|
||||||
|
:$put =g:test
|
||||||
|
:set linebreak
|
||||||
|
Go
|
||||||
|
abcd{ef
|
||||||
|
ghijklm
|
||||||
|
no}pqrs2k0f{c%
|
||||||
:%w! test.out
|
:%w! test.out
|
||||||
:qa!
|
:qa!
|
||||||
ENDTEST
|
ENDTEST
|
||||||
|
@ -46,3 +46,6 @@ Test 9: using redo after block visual mode
|
|||||||
AaA
|
AaA
|
||||||
AaA
|
AaA
|
||||||
A
|
A
|
||||||
|
Test 10: using normal commands after block-visual
|
||||||
|
|
||||||
|
abcdpqrs
|
||||||
|
@ -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 */
|
||||||
|
/**/
|
||||||
|
818,
|
||||||
/**/
|
/**/
|
||||||
817,
|
817,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user