int old_KeyTyped = KeyTyped;
#endif
+ if (ERROR_IF_ANY_POPUP_WINDOW)
+ return;
+
if (eap != NULL)
{
// A ":help" command ends at the first LF, or at a '|' that is
let g:test_is_flaky = 1
let origwin = win_getid()
+
+ " open help window to test that :help below fails
+ help
+
let termbuf = term_start(&shell, #{hidden: 1})
let winid = popup_create(termbuf, #{minwidth: 40, minheight: 10})
" Wait for shell to start
" Cannot escape from terminal window
call assert_fails('tab drop xxx', 'E863:')
+ call assert_fails('help', 'E994:')
" Cannot open a second one.
let termbuf2 = term_start(&shell, #{hidden: 1})
" Wait for shell to exit
call WaitForAssert({-> assert_equal("dead", job_status(term_getjob(termbuf)))})
+ helpclose
call feedkeys(":quit\<CR>", 'xt')
call assert_equal(origwin, win_getid())
endfunc