Skip to content

Commit 163095f

Browse files
committed
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)
1 parent faf29d7 commit 163095f

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

src/ex_cmds.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1625,7 +1625,7 @@ EX(CMD_winsize, "winsize", ex_winsize,
16251625
EXTRA|NEEDARG|TRLBAR,
16261626
ADDR_LINES),
16271627
EX(CMD_wincmd, "wincmd", ex_wincmd,
1628-
NEEDARG|WORD1|RANGE|NOTADR,
1628+
NEEDARG|WORD1|RANGE|NOTADR|CMDWIN,
16291629
ADDR_WINDOWS),
16301630
EX(CMD_windo, "windo", ex_listdo,
16311631
NEEDARG|EXTRA|NOTRLCOM|RANGE|NOTADR|DFLALL,

src/option.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7570,6 +7570,9 @@ did_set_string_option(
75707570
did_filetype = TRUE;
75717571
apply_autocmds(EVENT_FILETYPE, curbuf->b_p_ft,
75727572
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;
75737576
}
75747577
}
75757578
#endif

src/version.c

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

765765
static int included_patches[] =
766766
{ /* Add new patch number below this line */
767+
/**/
768+
704,
767769
/**/
768770
703,
769771
/**/

0 commit comments

Comments
 (0)