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)

89c17c02ca
This commit is contained in:
watiko
2016-02-11 15:56:46 +09:00
parent 84281bf675
commit 66571f64a4
4 changed files with 17 additions and 4 deletions

View File

@@ -7782,7 +7782,7 @@ static void nv_open(cmdarg_T *cap)
n_opencmd(cap);
}
// calculate start/end virtual columns for operating in block mode
// Calculate start/end virtual columns for operating in block mode.
static void get_op_vcol(
oparg_T *oap,
colnr_T redo_VIsual_vcol,
@@ -7792,11 +7792,14 @@ static void get_op_vcol(
colnr_T start;
colnr_T end;
if (VIsual_mode != Ctrl_V) {
if (VIsual_mode != Ctrl_V
|| (!initial && oap->end.col < curwin->w_width)) {
return;
}
oap->motion_type = MBLOCK;
if (VIsual_active) {
oap->motion_type = MBLOCK;
}
// prevent from moving onto a trail byte
if (has_mbyte) {