summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-09-11 14:39:53 +0200
committerBram Moolenaar <Bram@vim.org>2016-09-11 14:39:53 +0200
commit4930a76a0357f76a829eafe4985d04cf3ce0e9e0 (patch)
tree30ecbe75f00cf90c2cb01cb7d7aebe21bdebdde4
parentee39ef0b93d31763d05e54ba99801e3f1a254c0d (diff)
downloadvim-git-4930a76a0357f76a829eafe4985d04cf3ce0e9e0.tar.gz
patch 7.4.2362v7.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.
-rw-r--r--src/buffer.c4
-rw-r--r--src/ex_docmd.c1
-rw-r--r--src/version.c2
3 files changed, 5 insertions, 2 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 55e200ab8..b013295f7 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -580,7 +580,7 @@ aucmd_abort:
/* 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();
/*
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index dc0a71e68..eef559506 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -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 */
diff --git a/src/version.c b/src/version.c
index 9a6851e55..8a6062d76 100644
--- a/src/version.c
+++ b/src/version.c
@@ -764,6 +764,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 2362,
+/**/
2361,
/**/
2360,