Mercurial > vim
comparison src/terminal.c @ 13282:8db0345053b9 v8.0.1515
patch 8.0.1515: BufWinEnter event fired when opening hidden terminal
commit https://github.com/vim/vim/commit/ab5e7c3deb40328e1c7d40534ed8cd9da47a92f8
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Feb 13 14:07:18 2018 +0100
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)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 13 Feb 2018 14:15:06 +0100 |
parents | fc33325c91c1 |
children | c42fe898b578 |
comparison
equal
deleted
inserted
replaced
13281:d0000705c554 | 13282:8db0345053b9 |
---|---|
473 /* Make sure we don't get stuck on sending keys to the job, it leads to | 473 /* Make sure we don't get stuck on sending keys to the job, it leads to |
474 * a deadlock if the job is waiting for Vim to read. */ | 474 * a deadlock if the job is waiting for Vim to read. */ |
475 channel_set_nonblock(term->tl_job->jv_channel, PART_IN); | 475 channel_set_nonblock(term->tl_job->jv_channel, PART_IN); |
476 | 476 |
477 #ifdef FEAT_AUTOCMD | 477 #ifdef FEAT_AUTOCMD |
478 ++curbuf->b_locked; | 478 if (!opt->jo_hidden) |
479 apply_autocmds(EVENT_BUFWINENTER, NULL, NULL, FALSE, curbuf); | 479 { |
480 --curbuf->b_locked; | 480 ++curbuf->b_locked; |
481 apply_autocmds(EVENT_BUFWINENTER, NULL, NULL, FALSE, curbuf); | |
482 --curbuf->b_locked; | |
483 } | |
481 #endif | 484 #endif |
482 | 485 |
483 if (old_curbuf != NULL) | 486 if (old_curbuf != NULL) |
484 { | 487 { |
485 --curbuf->b_nwindows; | 488 --curbuf->b_nwindows; |