Permalink
Browse files

patch 7.4.2362

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.
  • Loading branch information...
1 parent ee39ef0 commit 4930a76a0357f76a829eafe4985d04cf3ce0e9e0 @brammool brammool committed Sep 11, 2016
Showing with 5 additions and 2 deletions.
  1. +2 −2 src/buffer.c
  2. +1 −0 src/ex_docmd.c
  3. +2 −0 src/version.c
View
@@ -580,7 +580,7 @@ close_buffer(
/* 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
@@ -1389,7 +1389,7 @@ do_buffer(
}
/* When closing the current buffer stop Visual mode. */
- if (buf == curbuf)
+ if (buf == curbuf && VIsual_active)
end_visual_mode();
/*
View
@@ -9388,6 +9388,7 @@ ex_at(exarg_T *eap)
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 */
View
@@ -764,6 +764,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 2362,
+/**/
2361,
/**/
2360,

0 comments on commit 4930a76

Please sign in to comment.