Problem: vi' sometimes does not select anything.
Solution: Recognize an empty selection. (Christian Brabandt, closes #5183)
return FALSE;
vis_bef_curs = LT_POS(VIsual, curwin->w_cursor);
+ vis_empty = EQUAL_POS(VIsual, curwin->w_cursor);
if (*p_sel == 'e')
{
- if (!vis_bef_curs)
+ if (!vis_bef_curs && !vis_empty)
{
// VIsual needs to be the start of Visual selection.
pos_T t = curwin->w_cursor;
restore_vis_bef = TRUE;
}
dec_cursor();
+ vis_empty = EQUAL_POS(VIsual, curwin->w_cursor);
}
- vis_empty = EQUAL_POS(VIsual, curwin->w_cursor);
}
if (!vis_empty)
set selection=exclusive
exe "norm! fdvhi'y"
call assert_equal('bcde', @")
+ let @"='dummy'
+ exe "norm! $gevi'y"
+ call assert_equal('bcde', @")
set selection&vim
bw!
endfunc
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 2314,
/**/
2313,
/**/