From 3f65c66df95445ef84f98de007c9b70ce23f54a0 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 27 May 2020 23:15:16 +0200 Subject: [PATCH] patch 8.2.0834: :drop command in terminal popup causes problems Problem: :drop command in terminal popup causes problems. Solution: Check for using a popup window. (closes #6151) --- src/ex_cmds.c | 3 +++ src/testdir/test_popupwin.vim | 3 +++ src/version.c | 2 ++ 3 files changed, 8 insertions(+) diff --git a/src/ex_cmds.c b/src/ex_cmds.c index 9c55de3adf..777f1490cf 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -6349,6 +6349,9 @@ ex_drop(exarg_T *eap) buf_T *buf; tabpage_T *tp; + if (ERROR_IF_POPUP_WINDOW || ERROR_IF_TERM_POPUP_WINDOW) + return; + /* * Check if the first argument is already being edited in a window. If * so, jump to that window. diff --git a/src/testdir/test_popupwin.vim b/src/testdir/test_popupwin.vim index 8c917bc8e3..1e7d5eed10 100644 --- a/src/testdir/test_popupwin.vim +++ b/src/testdir/test_popupwin.vim @@ -2445,6 +2445,9 @@ func Test_popupwin_terminal_buffer() call assert_fails('call feedkeys("gf", "xt")', 'E863:') call feedkeys("a\", 'xt') + " Cannot escape from terminal window + call assert_fails('tab drop xxx', 'E863:') + " Cannot open a second one. let termbuf2 = term_start(&shell, #{hidden: 1}) call assert_fails('call popup_create(termbuf2, #{})', 'E861:') diff --git a/src/version.c b/src/version.c index 44f7f26c43..24a576724b 100644 --- a/src/version.c +++ b/src/version.c @@ -746,6 +746,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 834, /**/ 833, /**/