Mercurial > vim
diff src/testdir/test_popupwin.vim @ 16863:2b00163053cd v8.1.1433
patch 8.1.1433: win_execute() may leave popup window focused
commit https://github.com/vim/vim/commit/eea169983654de8a502c2c6521696a4b504abfa3
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri May 31 17:34:48 2019 +0200
patch 8.1.1433: win_execute() may leave popup window focused
Problem: Win_execute() may leave popup window focused, eventually leading
to a crash. (Bjorn Linse)
Solution: When previous window was closed, go to the first window.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 31 May 2019 17:45:06 +0200 |
parents | 0154363d3b98 |
children | da5f5836e90c |
line wrap: on
line diff
--- a/src/testdir/test_popupwin.vim +++ b/src/testdir/test_popupwin.vim @@ -105,6 +105,14 @@ func Test_popup_with_syntax_setbufvar() call delete('XtestPopup') endfunc +func Test_win_execute_closing_curwin() + split + let winid = popup_create('some text', {}) + call win_execute(winid, winnr() .. "close") + call assert_equal(1, winnr()) + popupclear +endfunc + func Test_popup_with_wrap() if !CanRunVimInTerminal() return