# HG changeset patch # User Bram Moolenaar # Date 1335798292 -7200 # Node ID b782e2f9e6892116ae5d068249b5198bbe0042c6 # Parent d1e4abe8342c4adb1890bf1833a6f41f7a310b01 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. diff --git a/src/fileio.c b/src/fileio.c --- 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 --- 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,