diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-01-14 20:42:48 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-01-14 20:42:48 +0100 |
commit | ca7c078b799bfc96b54e9e41f5be3e0bfefadce5 (patch) | |
tree | 5d1653b9907c49abb4107b3f705787d9445cb8c7 /src/testdir | |
parent | 8024f936368336241406137a2fa78ed5ee9000a6 (diff) | |
download | vim-git-ca7c078b799bfc96b54e9e41f5be3e0bfefadce5.tar.gz |
patch 8.2.0118: crash when cycling to buffers involving popup windowv8.2.0118
Problem: Crash when cycling to buffers involving popup window .
Solution: Do not decrement buffer reference count.
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/dumps/Test_popupwin_infopopup_7.dump | 14 | ||||
-rw-r--r-- | src/testdir/test_popupwin.vim | 12 |
2 files changed, 25 insertions, 1 deletions
diff --git a/src/testdir/dumps/Test_popupwin_infopopup_7.dump b/src/testdir/dumps/Test_popupwin_infopopup_7.dump new file mode 100644 index 000000000..3890d1235 --- /dev/null +++ b/src/testdir/dumps/Test_popupwin_infopopup_7.dump @@ -0,0 +1,14 @@ +|a+0&#ffffff0|w|o|r|d| @69 +|t|e|s|t| |t|e|x|t| |a|w|o|r|d> @17|╔+0&#ffff4012|═@15|X| +0&#ffffff0@23 +|~+0#4040ff13&| @7| +0#0000001#e0e0e08|w|r|d| @4|W| |e|x|t|r|a| |t|e|x|t| @1| +0#0000000#0000001|║+0&#ffff4012| |w|o|r|d|s| |a|r|e| |c|o@1|l| |║| +0#4040ff13#ffffff0@23 +|~| @7| +0#0000001#ffd7ff255|a|n|o|t|w|r|d| |W| |e|x|t|r|a| |t|e|x|t| @1| +0#0000000#0000001|╚+0&#ffff4012|═@15|⇲| +0#4040ff13#ffffff0@23 +|~| @7| +0#0000001#ffd7ff255|n|o|a|w|r|d| @1|W| |e|x|t|r|a| |t|e|x|t| @1| +0#0000000#a8a8a8255| +0#4040ff13#ffffff0@41 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|-+2#0000000&@1| |U|s|e|r| |d|e|f|i|n|e|d| |c|o|m|p|l|e|t|i|o|n| |(|^|U|^|N|^|P|)| |m+0#00e0003&|a|t|c|h| |1| |o|f| |4| +0#0000000&@26 diff --git a/src/testdir/test_popupwin.vim b/src/testdir/test_popupwin.vim index 94ea423c1..9370a11a7 100644 --- 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 |