Mercurial > vim
changeset 20561:18c52f380193 v8.2.0834
patch 8.2.0834: :drop command in terminal popup causes problems
Commit: https://github.com/vim/vim/commit/3f65c66df95445ef84f98de007c9b70ce23f54a0
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed May 27 23:15:16 2020 +0200
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 https://github.com/vim/vim/issues/6151)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 27 May 2020 23:30:03 +0200 |
parents | 4cb09af7ab7d |
children | 4d120d19ba0a |
files | src/ex_cmds.c src/testdir/test_popupwin.vim src/version.c |
diffstat | 3 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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.
--- 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\<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:')