Skip to content

Commit 4661765

Browse files
committed
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.
1 parent cfbdc48 commit 4661765

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/fileio.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8982,6 +8982,10 @@ aucmd_restbuf(aco)
89828982
&& buf_valid(aco->new_curbuf)
89838983
&& aco->new_curbuf->b_ml.ml_mfp != NULL)
89848984
{
8985+
# if defined(FEAT_SYN_HL) || defined(FEAT_SPELL)
8986+
if (curwin->w_s == &curbuf->b_s)
8987+
curwin->w_s = &aco->new_curbuf->b_s;
8988+
# endif
89858989
--curbuf->b_nwindows;
89868990
curbuf = aco->new_curbuf;
89878991
curwin->w_buffer = curbuf;

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -714,6 +714,8 @@ static char *(features[]) =
714714

715715
static int included_patches[] =
716716
{ /* Add new patch number below this line */
717+
/**/
718+
511,
717719
/**/
718720
510,
719721
/**/

0 commit comments

Comments
 (0)