summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <bram@vim.org>2012-04-30 17:04:52 +0200
committerBram Moolenaar <bram@vim.org>2012-04-30 17:04:52 +0200
commit664968d0b4b813134feff597aca2cf1a8d0a7f9c (patch)
tree654feb3a10bf85f2d5b408a92e68ee7de16f80ea
parent8ce15ad62733c3a83096650d7810cde8a9b1ee2e (diff)
downloadvim-664968d0b4b813134feff597aca2cf1a8d0a7f9c.tar.gz
updated for version 7.3.511v7.3.511v7-3-511
Problem: Using a FileReadCmd autocommand that does ":e! {file}" may cause a crash. (Christian Brabandt) Solution: Properly restore curwin->w_s.
-rw-r--r--src/fileio.c4
-rw-r--r--src/version.c2
2 files changed, 6 insertions, 0 deletions
diff --git a/src/fileio.c b/src/fileio.c
index 52eb34b3..6fe11274 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -8982,6 +8982,10 @@ win_found:
&& buf_valid(aco->new_curbuf)
&& aco->new_curbuf->b_ml.ml_mfp != NULL)
{
+# if defined(FEAT_SYN_HL) || defined(FEAT_SPELL)
+ if (curwin->w_s == &curbuf->b_s)
+ curwin->w_s = &aco->new_curbuf->b_s;
+# endif
--curbuf->b_nwindows;
curbuf = aco->new_curbuf;
curwin->w_buffer = curbuf;
diff --git a/src/version.c b/src/version.c
index 9352c700..b2f9a986 100644
--- a/src/version.c
+++ b/src/version.c
@@ -715,6 +715,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 511,
+/**/
510,
/**/
509,