]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.2.0834: :drop command in terminal popup causes problems v8.2.0834
authorBram Moolenaar <Bram@vim.org>
Wed, 27 May 2020 21:15:16 +0000 (23:15 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 27 May 2020 21:15:16 +0000 (23:15 +0200)
Problem:    :drop command in terminal popup causes problems.
Solution:   Check for using a popup window. (closes #6151)

src/ex_cmds.c
src/testdir/test_popupwin.vim
src/version.c

index 9c55de3adf635f1c2da3cd646082a045d81c22b3..777f1490cfd5e1da0064a7f7819b7e368b8c482d 100644 (file)
@@ -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.
index 8c917bc8e3be24a5e5cc5deff38889339221e03a..1e7d5eed105c6c84f7912288d66450e7e7efbfe7 100644 (file)
@@ -2445,6 +2445,9 @@ func Test_popupwin_terminal_buffer()
   call assert_fails('call feedkeys("gf", "xt")', 'E863:')
   call feedkeys("a\<C-U>", '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:')
index 44f7f26c43abadc031d61a9e2e1433431570c66f..24a576724b66bd62cf363c6229c97710aed940d0 100644 (file)
@@ -746,6 +746,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    834,
 /**/
     833,
 /**/