Mercurial > vim
changeset 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 | d1e4abe8342c |
children | d36e92c7c98a |
files | src/fileio.c src/version.c |
diffstat | 2 files changed, 6 insertions(+), 0 deletions(-) [+] |
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;