0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

patch 8.0.1515: BufWinEnter event fired when opening hidden terminal

Problem:    BufWinEnter event fired when opening hidden terminal.
Solution:   Do not fire BufWinEnter when the terminal is midden and does not
            open a window. (Kenta Sato, closes #2636)
This commit is contained in:
Bram Moolenaar 2018-02-13 14:07:18 +01:00
parent 07ad816525
commit ab5e7c3deb
2 changed files with 8 additions and 3 deletions

View File

@ -475,9 +475,12 @@ term_start(typval_T *argvar, jobopt_T *opt, int forceit)
channel_set_nonblock(term->tl_job->jv_channel, PART_IN);
#ifdef FEAT_AUTOCMD
++curbuf->b_locked;
apply_autocmds(EVENT_BUFWINENTER, NULL, NULL, FALSE, curbuf);
--curbuf->b_locked;
if (!opt->jo_hidden)
{
++curbuf->b_locked;
apply_autocmds(EVENT_BUFWINENTER, NULL, NULL, FALSE, curbuf);
--curbuf->b_locked;
}
#endif
if (old_curbuf != NULL)

View File

@ -771,6 +771,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1515,
/**/
1514,
/**/