comparison src/testdir/test_popupwin.vim @ 18868:5fbb167591fc v8.1.2420

patch 8.1.2420: crash when calling popup_close() in win_execute() Commit: https://github.com/vim/vim/commit/4954019c93a2bb5a0b1af54b5961c933beeb56f4 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Dec 11 19:34:54 2019 +0100 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)
author Bram Moolenaar <Bram@vim.org>
date Wed, 11 Dec 2019 19:45:04 +0100
parents 9449ed2ee8d4
children 48e0208f53c2
comparison
equal deleted inserted replaced
18867:c9409f359583 18868:5fbb167591fc
888 888
889 func Test_win_execute_closing_curwin() 889 func Test_win_execute_closing_curwin()
890 split 890 split
891 let winid = popup_create('some text', {}) 891 let winid = popup_create('some text', {})
892 call assert_fails('call win_execute(winid, winnr() .. "close")', 'E994') 892 call assert_fails('call win_execute(winid, winnr() .. "close")', 'E994')
893 call popup_clear()
894
895 let winid = popup_create('some text', {})
896 call assert_fails('call win_execute(winid, printf("normal! :\<C-u>call popup_close(%d)\<CR>", winid))', 'E994')
893 call popup_clear() 897 call popup_clear()
894 endfunc 898 endfunc
895 899
896 func Test_win_execute_not_allowed() 900 func Test_win_execute_not_allowed()
897 let winid = popup_create('some text', {}) 901 let winid = popup_create('some text', {})