diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-07-09 15:41:53 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-07-09 15:41:53 +0200 |
commit | 163095f088a7c29710a16c75bb56229dd3b4116a (patch) | |
tree | ebc0f984037610e8b604469b54bbc9ceb0c8e748 | |
parent | faf29d7f91477c25c85d9d7165d90e8d8f1c512e (diff) | |
download | vim-git-163095f088a7c29710a16c75bb56229dd3b4116a.tar.gz |
patch 8.0.0704: problems with autocommands when opening helpv8.0.0704
Problem: Problems with autocommands when opening help.
Solution: Avoid using invalid "varp" value. Allow using :wincmd if buffer
is locked. (closes #1806, closes #1804)
-rw-r--r-- | src/ex_cmds.h | 2 | ||||
-rw-r--r-- | src/option.c | 3 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 6 insertions, 1 deletions
diff --git a/src/ex_cmds.h b/src/ex_cmds.h index cde015763..0844a9cc2 100644 --- a/src/ex_cmds.h +++ b/src/ex_cmds.h @@ -1625,7 +1625,7 @@ EX(CMD_winsize, "winsize", ex_winsize, EXTRA|NEEDARG|TRLBAR, ADDR_LINES), EX(CMD_wincmd, "wincmd", ex_wincmd, - NEEDARG|WORD1|RANGE|NOTADR, + NEEDARG|WORD1|RANGE|NOTADR|CMDWIN, ADDR_WINDOWS), EX(CMD_windo, "windo", ex_listdo, NEEDARG|EXTRA|NOTRLCOM|RANGE|NOTADR|DFLALL, diff --git a/src/option.c b/src/option.c index ebc547e73..cdb0d67e6 100644 --- a/src/option.c +++ b/src/option.c @@ -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 diff --git a/src/version.c b/src/version.c index d494900b0..8129a7eb8 100644 --- a/src/version.c +++ b/src/version.c @@ -765,6 +765,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 704, +/**/ 703, /**/ 702, |