Mercurial > vim
comparison src/option.c @ 11643:db3ac953b942 v8.0.0704
patch 8.0.0704: problems with autocommands when opening help
commit https://github.com/vim/vim/commit/163095f088a7c29710a16c75bb56229dd3b4116a
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jul 9 15:41:53 2017 +0200
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)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 09 Jul 2017 15:45:03 +0200 |
parents | b8299e742f41 |
children | 16dab1cd56f2 |
comparison
equal
deleted
inserted
replaced
11642:389cb40dda69 | 11643:db3ac953b942 |
---|---|
7568 if (!(opt_flags & OPT_MODELINE) || ft_changed) | 7568 if (!(opt_flags & OPT_MODELINE) || ft_changed) |
7569 { | 7569 { |
7570 did_filetype = TRUE; | 7570 did_filetype = TRUE; |
7571 apply_autocmds(EVENT_FILETYPE, curbuf->b_p_ft, | 7571 apply_autocmds(EVENT_FILETYPE, curbuf->b_p_ft, |
7572 curbuf->b_fname, TRUE, curbuf); | 7572 curbuf->b_fname, TRUE, curbuf); |
7573 /* Just in case the old "curbuf" is now invalid. */ | |
7574 if (varp != &(curbuf->b_p_ft)) | |
7575 varp = NULL; | |
7573 } | 7576 } |
7574 } | 7577 } |
7575 #endif | 7578 #endif |
7576 #ifdef FEAT_SPELL | 7579 #ifdef FEAT_SPELL |
7577 if (varp == &(curwin->w_s->b_p_spl)) | 7580 if (varp == &(curwin->w_s->b_p_spl)) |