patch 8.1.2420: crash when calling popup_close() in win_execute()
Problem: Crash when calling popup_close() in win_execute().
Solution: Disallow popup_close() in popup window. (Yasuhiro Matsumoto,
closes #5345)
diff --git a/src/testdir/test_popupwin.vim b/src/testdir/test_popupwin.vim
index 5d7f46f..d5ee716 100644
--- a/src/testdir/test_popupwin.vim
+++ b/src/testdir/test_popupwin.vim
@@ -891,6 +891,10 @@
let winid = popup_create('some text', {})
call assert_fails('call win_execute(winid, winnr() .. "close")', 'E994')
call popup_clear()
+
+ let winid = popup_create('some text', {})
+ call assert_fails('call win_execute(winid, printf("normal! :\<C-u>call popup_close(%d)\<CR>", winid))', 'E994')
+ call popup_clear()
endfunc
func Test_win_execute_not_allowed()