Mercurial > vim
diff src/fileio.c @ 3497:b782e2f9e689 v7.3.511
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.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Mon, 30 Apr 2012 17:04:52 +0200 |
parents | fe7bf24804e1 |
children | 09d0bda69df0 |
line wrap: on
line diff
--- 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;