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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user