comparison src/testdir/test_popupwin.vim @ 18162:9c3347b21b89 v8.1.2076

patch 8.1.2076: crash when trying to put a terminal in a popup window Commit: https://github.com/vim/vim/commit/e0d749a49630778d45642d7589a3703697746760 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Sep 25 22:14:48 2019 +0200 patch 8.1.2076: crash when trying to put a terminal in a popup window Problem: Crash when trying to put a terminal buffer in a popup window. Solution: Check for NULL buffer. Do not allow putting a terminal in a popup window.
author Bram Moolenaar <Bram@vim.org>
date Wed, 25 Sep 2019 22:15:03 +0200
parents 5a5e9eed6029
children 781a81bf4d24
comparison
equal deleted inserted replaced
18161:94e3c1e4d5ae 18162:9c3347b21b89
1990 redraw 1990 redraw
1991 call popup_close(winid) 1991 call popup_close(winid)
1992 call delete('XsomeFile') 1992 call delete('XsomeFile')
1993 endfunc 1993 endfunc
1994 1994
1995 func Test_popupwin_terminal_buffer()
1996 let ptybuf = term_start(&shell, #{hidden: 1})
1997 call assert_fails('let winnr = popup_create(ptybuf, #{})', 'E278:')
1998 exe 'bwipe! ' .. ptybuf
1999 endfunc
2000
1995 func Test_popupwin_with_buffer_and_filter() 2001 func Test_popupwin_with_buffer_and_filter()
1996 new Xwithfilter 2002 new Xwithfilter
1997 call setline(1, range(100)) 2003 call setline(1, range(100))
1998 let bufnr = bufnr() 2004 let bufnr = bufnr()
1999 hide 2005 hide