Permalink
Browse files

updated for version 7.3.511

Problem:    Using a FileReadCmd autocommand that does ":e! {file}" may cause a
	    crash. (Christian Brabandt)
Solution:   Properly restore curwin->w_s.
  • Loading branch information...
brammool committed Apr 30, 2012
1 parent cfbdc48 commit 4661765ca4b978f462058b12c134d49ea1d22360
Showing with 6 additions and 0 deletions.
  1. +4 −0 src/fileio.c
  2. +2 −0 src/version.c
View
@@ -8982,6 +8982,10 @@ aucmd_restbuf(aco)
&& 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;
View
@@ -714,6 +714,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 511,
/**/
510,
/**/

0 comments on commit 4661765

Please sign in to comment.