Problem: Cursor moves to wrong position when using "gj" after "$" and
virtual editing is active.
Solution: Make "gj" behave differently when virtual editing is active.
(Hirohito Higashi)
}
#endif
- coladvance(curwin->w_curswant);
+ if (virtual_active() && atend)
+ coladvance(MAXCOL);
+ else
+ coladvance(curwin->w_curswant);
#if defined(FEAT_LINEBREAK) || defined(FEAT_MBYTE)
if (curwin->w_cursor.col > 0 && curwin->w_p_wrap)
G3o123456789\e2k05l\162jr\rG3o98765\e2k02l\162jr\16\r
G3o123456789\e2k05l\162jr
G3o98765\e2k02l\162jr\16
+:"
+:" Test cursor position. When ve=block and Visual block mode and $gj
+:set ve=block
+:exe ":norm! 2k\<C-V>$gj\<Esc>"
+:let cpos=getpos("'>")
+:$put ='col:'.cpos[2].' off:'.cpos[3]
:/^the/,$w >> test.out
:qa!
ENDTEST
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 147,
/**/
146,
/**/