Mercurial > vim
diff 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 |
line wrap: on
line diff
--- a/src/testdir/test_popupwin.vim +++ b/src/testdir/test_popupwin.vim @@ -1045,7 +1045,7 @@ func Test_popup_hide() call assert_equal('hello', line) call assert_equal(0, popup_getpos(winid).visible) " buffer is still listed but hidden - call assert_match(winbufnr(winid) .. 'u h.*\[Popup\]', execute('ls u')) + call assert_match(winbufnr(winid) .. 'u a.*\[Popup\]', execute('ls u')) eval winid->popup_show() redraw @@ -2936,6 +2936,16 @@ func Test_popupmenu_info_border() call term_sendkeys(buf, "cc\<C-X>\<C-U>") call VerifyScreenDump(buf, 'Test_popupwin_infopopup_6', {}) + " Hide the info popup, cycle trough buffers, make sure it didn't get + " deleted. + call term_sendkeys(buf, "\<Esc>") + call term_sendkeys(buf, ":set hidden\<CR>") + call term_sendkeys(buf, ":bn\<CR>") + call term_sendkeys(buf, ":bn\<CR>") + call term_sendkeys(buf, "otest text test text\<C-X>\<C-U>") + call VerifyScreenDump(buf, 'Test_popupwin_infopopup_7', {}) + + call term_sendkeys(buf, "\<Esc>") call StopVimInTerminal(buf) call delete('XtestInfoPopup') endfunc