Problem: Reading before the start of the line.
Solution: Check boundary before trying to read the character.
{
int s = bd->textlen + bd->endspaces;
- while (VIM_ISWHITE(*(bd->textstart + s - 1)) && s > 0)
+ while (s > 0 && VIM_ISWHITE(*(bd->textstart + s - 1)))
{
s = s - (*mb_head_off)(bd->textstart, bd->textstart + s - 1) - 1;
pnew--;
bw!
endfunc
+func Test_visual_block_yank_zy()
+ new
+ " this was reading before the start of the line
+ exe "norm o\<C-T>\<Esc>\<C-V>zy"
+ bwipe!
+endfunc
+
func Test_visual_block_with_virtualedit()
CheckScreendump
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 4219,
/**/
4218,
/**/