0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

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.
This commit is contained in:
Bram Moolenaar
2012-04-30 17:04:52 +02:00
parent 9a7224b5a0
commit 7da9c37a17
2 changed files with 6 additions and 0 deletions

View File

@@ -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;