Problem: Using "gN" while 'selection' is "exclusive" misses one character.
(Ben Fritz)
Solution: Check the direction when compensating for exclusive selection.
(Christian Brabandt)
if (VIsual_active)
{
redraw_curbuf_later(INVERTED); /* update the inversion */
- if (*p_sel == 'e' && ltoreq(VIsual, curwin->w_cursor))
- inc_cursor();
+ if (*p_sel == 'e')
+ {
+ /* Correction for exclusive selection depends on the direction. */
+ if (forward && ltoreq(VIsual, curwin->w_cursor))
+ inc_cursor();
+ else if (!forward && ltoreq(curwin->w_cursor, VIsual))
+ inc(&VIsual);
+ }
+
}
#ifdef FEAT_FOLDING
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 673,
/**/
672,
/**/