diff options
author | Bram Moolenaar <Bram@vim.org> | 2012-04-30 17:04:52 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2012-04-30 17:04:52 +0200 |
commit | 7da9c37a17745e0021e59467e55ee11976752603 (patch) | |
tree | 95748dea406e9bd05c5746f3982bb48c1bb24563 /src/fileio.c | |
parent | 9a7224b5a0639c26c843c10afcafa5bf149271fd (diff) | |
download | vim-7da9c37a17745e0021e59467e55ee11976752603.zip |
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.
Diffstat (limited to 'src/fileio.c')
-rw-r--r-- | src/fileio.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/fileio.c b/src/fileio.c index 52eb34b3b..6fe112745 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; |