comparison src/testdir/test_popupwin.vim @ 19117:8db080710015 v8.2.0118

patch 8.2.0118: crash when cycling to buffers involving popup window Commit: https://github.com/vim/vim/commit/ca7c078b799bfc96b54e9e41f5be3e0bfefadce5 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jan 14 20:42:48 2020 +0100 patch 8.2.0118: crash when cycling to buffers involving popup window Problem: Crash when cycling to buffers involving popup window . Solution: Do not decrement buffer reference count.
author Bram Moolenaar <Bram@vim.org>
date Tue, 14 Jan 2020 20:45:04 +0100
parents 48e0208f53c2
children 17722555af22
comparison
equal deleted inserted replaced
19116:9b7f90e56753 19117:8db080710015
1043 redraw 1043 redraw
1044 let line = join(map(range(1, 5), 'screenstring(1, v:val)'), '') 1044 let line = join(map(range(1, 5), 'screenstring(1, v:val)'), '')
1045 call assert_equal('hello', line) 1045 call assert_equal('hello', line)
1046 call assert_equal(0, popup_getpos(winid).visible) 1046 call assert_equal(0, popup_getpos(winid).visible)
1047 " buffer is still listed but hidden 1047 " buffer is still listed but hidden
1048 call assert_match(winbufnr(winid) .. 'u h.*\[Popup\]', execute('ls u')) 1048 call assert_match(winbufnr(winid) .. 'u a.*\[Popup\]', execute('ls u'))
1049 1049
1050 eval winid->popup_show() 1050 eval winid->popup_show()
1051 redraw 1051 redraw
1052 let line = join(map(range(1, 5), 'screenstring(1, v:val)'), '') 1052 let line = join(map(range(1, 5), 'screenstring(1, v:val)'), '')
1053 call assert_equal('world', line) 1053 call assert_equal('world', line)
2934 call term_sendkeys(buf, "\<Esc>") 2934 call term_sendkeys(buf, "\<Esc>")
2935 call term_sendkeys(buf, ":set pumheight=3\<CR>") 2935 call term_sendkeys(buf, ":set pumheight=3\<CR>")
2936 call term_sendkeys(buf, "cc\<C-X>\<C-U>") 2936 call term_sendkeys(buf, "cc\<C-X>\<C-U>")
2937 call VerifyScreenDump(buf, 'Test_popupwin_infopopup_6', {}) 2937 call VerifyScreenDump(buf, 'Test_popupwin_infopopup_6', {})
2938 2938
2939 " Hide the info popup, cycle trough buffers, make sure it didn't get
2940 " deleted.
2941 call term_sendkeys(buf, "\<Esc>")
2942 call term_sendkeys(buf, ":set hidden\<CR>")
2943 call term_sendkeys(buf, ":bn\<CR>")
2944 call term_sendkeys(buf, ":bn\<CR>")
2945 call term_sendkeys(buf, "otest text test text\<C-X>\<C-U>")
2946 call VerifyScreenDump(buf, 'Test_popupwin_infopopup_7', {})
2947
2948 call term_sendkeys(buf, "\<Esc>")
2939 call StopVimInTerminal(buf) 2949 call StopVimInTerminal(buf)
2940 call delete('XtestInfoPopup') 2950 call delete('XtestInfoPopup')
2941 endfunc 2951 endfunc
2942 2952
2943 func Test_popupmenu_info_noborder() 2953 func Test_popupmenu_info_noborder()