diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-10-06 20:46:49 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-10-06 20:46:49 +0200 |
commit | 349f609f8990a3aca9a4b8faa0585d75e03116db (patch) | |
tree | 02b404547152990ad45eb9eb7736e21b4b4da38e | |
parent | 253b16a4abdad1df350b9ddd9a709520b063934c (diff) |
patch 8.2.1807: can use :help in a terminal popup windowv8.2.1807
Problem: Can use :help in a terminal popup window.
Solution: Give an error. (closes #7088)
-rw-r--r-- | src/help.c | 3 | ||||
-rw-r--r-- | src/testdir/test_popupwin.vim | 6 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 11 insertions, 0 deletions
diff --git a/src/help.c b/src/help.c index 4f2b6b69e0..4d59ab90e1 100644 --- a/src/help.c +++ b/src/help.c @@ -39,6 +39,9 @@ ex_help(exarg_T *eap) int old_KeyTyped = KeyTyped; #endif + if (ERROR_IF_ANY_POPUP_WINDOW) + return; + if (eap != NULL) { // A ":help" command ends at the first LF, or at a '|' that is diff --git a/src/testdir/test_popupwin.vim b/src/testdir/test_popupwin.vim index e991fc116f..187b4f13eb 100644 --- a/src/testdir/test_popupwin.vim +++ b/src/testdir/test_popupwin.vim @@ -2645,6 +2645,10 @@ func Test_popupwin_terminal_buffer() let g:test_is_flaky = 1 let origwin = win_getid() + + " open help window to test that :help below fails + help + let termbuf = term_start(&shell, #{hidden: 1}) let winid = popup_create(termbuf, #{minwidth: 40, minheight: 10}) " Wait for shell to start @@ -2666,6 +2670,7 @@ func Test_popupwin_terminal_buffer() " Cannot escape from terminal window call assert_fails('tab drop xxx', 'E863:') + call assert_fails('help', 'E994:') " Cannot open a second one. let termbuf2 = term_start(&shell, #{hidden: 1}) @@ -2677,6 +2682,7 @@ func Test_popupwin_terminal_buffer() " Wait for shell to exit call WaitForAssert({-> assert_equal("dead", job_status(term_getjob(termbuf)))}) + helpclose call feedkeys(":quit\<CR>", 'xt') call assert_equal(origwin, win_getid()) endfunc diff --git a/src/version.c b/src/version.c index a410167beb..daac37215c 100644 --- a/src/version.c +++ b/src/version.c @@ -751,6 +751,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1807, +/**/ 1806, /**/ 1805, |