Problem: When 'selection' is "exclusive" then "1v" is one char short.
Solution: Add one character when 'selection' is "exclusive. (closes #11791)
if (resel_VIsual_line_count <= 1)
{
update_curswant_force();
- curwin->w_curswant += resel_VIsual_vcol * cap->count0 - 1;
+ curwin->w_curswant += resel_VIsual_vcol * cap->count0;
+ if (*p_sel != 'e')
+ --curwin->w_curswant;
}
else
curwin->w_curswant = resel_VIsual_vcol;
bwipe!
endfunc
+func Test_visual_reselect_exclusive()
+ new
+ call setline(1, ['abcde', 'abcde'])
+ set selection=exclusive
+ normal 1G0viwd
+ normal 2G01vd
+ call assert_equal(['', ''], getline(1, 2))
+
+ set selection&
+ bwipe!
+endfunc
+
func Test_visual_block_insert_round_off()
new
" The number of characters are tuned to fill a 4096 byte allocated block,
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1172,
/**/
1171,
/**/