diff options
author | LemonBoy <thatlemon@gmail.com> | 2022-04-23 14:07:56 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-04-23 14:07:56 +0100 |
commit | 4a392d244018fadda375a490f4f4b921023248b9 (patch) | |
tree | 3387e57ffd7618b49c3b88313b6c5e98d7a91cee /src/testdir/test_terminal3.vim | |
parent | 2c40707baa13a53cac4137ffb8b2ac67f50cea63 (diff) | |
download | vim-git-4a392d244018fadda375a490f4f4b921023248b9.tar.gz |
patch 8.2.4814: possible to leave a popup window with win_gotoid()v8.2.4814
Problem: Possible to leave a popup window with win_gotoid().
Solution: Give an error when trying to leave a popup window with
win_gotoid(). (closes #10253)
Diffstat (limited to 'src/testdir/test_terminal3.vim')
-rw-r--r-- | src/testdir/test_terminal3.vim | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/testdir/test_terminal3.vim b/src/testdir/test_terminal3.vim index 9b5a02f52..b798e9a0b 100644 --- a/src/testdir/test_terminal3.vim +++ b/src/testdir/test_terminal3.vim @@ -528,6 +528,18 @@ func Test_double_popup_terminal() exe buf2 .. 'bwipe!' endfunc +func Test_escape_popup_terminal() + set hidden + + " Cannot escape a terminal popup window using win_gotoid + let prev_win = win_getid() + eval term_start('sh', #{hidden: 1, term_finish: 'close'})->popup_create({}) + call assert_fails("call win_gotoid(" .. prev_win .. ")", 'E863:') + + call popup_clear(1) + set hidden& +endfunc + func Test_issue_5607() let wincount = winnr('$') exe 'terminal' &shell &shellcmdflag 'exit' |