summaryrefslogtreecommitdiff
path: root/src/normal.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/normal.c')
-rw-r--r--src/normal.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/normal.c b/src/normal.c
index 309b895a9..a46cc9d64 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -9583,20 +9583,21 @@ nv_cursorhold(cap)
#endif
/*
- * 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(oap, redo_VIsual_vcol, initial)
oparg_T *oap;
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;
- if (VIsual_mode != Ctrl_V)
+ if (VIsual_mode != Ctrl_V
+ || (!initial && oap->end.col < W_WIDTH(curwin)))
return;
- oap->block_mode = TRUE;
+ oap->block_mode = VIsual_active;
#ifdef FEAT_MBYTE
/* prevent from moving onto a trail byte */