Problem: Illegal memory access with ":1@". (Dominique Pelle)
Solution: Correct cursor column after setting the line number. Also avoid
calling end_visual_mode() when not in Visual mode.
/* When closing the current buffer stop Visual mode before freeing
* anything. */
- if (buf == curbuf
+ if (buf == curbuf && VIsual_active
#if defined(EXITFREE)
&& !entered_free_all_mem
#endif
}
/* When closing the current buffer stop Visual mode. */
- if (buf == curbuf)
+ if (buf == curbuf && VIsual_active)
end_visual_mode();
/*
int prev_len = typebuf.tb_len;
curwin->w_cursor.lnum = eap->line2;
+ check_cursor_col();
#ifdef USE_ON_FLY_SCROLL
dont_scroll = TRUE; /* disallow scrolling here */
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 2362,
/**/
2361,
/**/