patch 8.0.1789: BufWinEnter does not work well for a terminal window

Problem:    BufWinEnter does not work well for a terminal window.
Solution:   Do not trigger BufWinEnter when opening a terminal window.
diff --git a/src/terminal.c b/src/terminal.c
index 1fd9ed2..56e08db 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -605,13 +605,7 @@
 	 * a deadlock if the job is waiting for Vim to read. */
 	channel_set_nonblock(term->tl_job->jv_channel, PART_IN);
 
-	if (old_curbuf == NULL)
-	{
-	    ++curbuf->b_locked;
-	    apply_autocmds(EVENT_BUFWINENTER, NULL, NULL, FALSE, curbuf);
-	    --curbuf->b_locked;
-	}
-	else
+	if (old_curbuf != NULL)
 	{
 	    --curbuf->b_nwindows;
 	    curbuf = old_curbuf;