Problem: After text formatting the cursor may be in an invalid position.
Solution: Correct the cursor position after formatting.
close!
endfunc
+" This was leaving the cursor after the end of a line. Complicated way to
+" have the problem show up with valgrind.
+func Test_correct_cursor_position()
+ set encoding=iso8859
+ new
+ norm a000\93\14\14\14\14\14\14\14\14\140
+ sil! norm gggg0i0\ f\ f\ fgw0gg
+
+ bwipe!
+ set encoding=utf8
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
{
curwin->w_cursor = saved_cursor;
saved_cursor.lnum = 0;
+
+ // formatting may have made the cursor position invalid
+ check_cursor();
}
if (oap->is_VIsual)
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 5013,
/**/
5012,
/**/