1
0
forked from aniani/vim

patch 8.0.0704: problems with autocommands when opening help

Problem:    Problems with autocommands when opening help.
Solution:   Avoid using invalid "varp" value.  Allow using :wincmd if buffer
            is locked. (closes #1806, closes #1804)
This commit is contained in:
Bram Moolenaar
2017-07-09 15:41:53 +02:00
parent faf29d7f91
commit 163095f088
3 changed files with 6 additions and 1 deletions

View File

@@ -7570,6 +7570,9 @@ did_set_string_option(
did_filetype = TRUE;
apply_autocmds(EVENT_FILETYPE, curbuf->b_p_ft,
curbuf->b_fname, TRUE, curbuf);
/* Just in case the old "curbuf" is now invalid. */
if (varp != &(curbuf->b_p_ft))
varp = NULL;
}
}
#endif