mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 8.2.0743: can move to another buffer from a terminal in popup window
Problem: Can move to another buffer from a terminal in popup window. Solution: Do not allow "gf" or editing a file. (closes #6072)
This commit is contained in:
parent
48a687148c
commit
5aed0ccb96
@ -2484,6 +2484,11 @@ do_ecmd(
|
|||||||
int did_inc_redrawing_disabled = FALSE;
|
int did_inc_redrawing_disabled = FALSE;
|
||||||
long *so_ptr = curwin->w_p_so >= 0 ? &curwin->w_p_so : &p_so;
|
long *so_ptr = curwin->w_p_so >= 0 ? &curwin->w_p_so : &p_so;
|
||||||
|
|
||||||
|
#ifdef FEAT_PROP_POPUP
|
||||||
|
if (ERROR_IF_TERM_POPUP_WINDOW)
|
||||||
|
return FAIL;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (eap != NULL)
|
if (eap != NULL)
|
||||||
command = eap->do_ecmd_cmd;
|
command = eap->do_ecmd_cmd;
|
||||||
set_bufref(&old_curbuf, curbuf);
|
set_bufref(&old_curbuf, curbuf);
|
||||||
|
@ -4169,6 +4169,10 @@ nv_gotofile(cmdarg_T *cap)
|
|||||||
clearop(cap->oap);
|
clearop(cap->oap);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#ifdef FEAT_PROP_POPUP
|
||||||
|
if (ERROR_IF_TERM_POPUP_WINDOW)
|
||||||
|
return;
|
||||||
|
#endif
|
||||||
|
|
||||||
ptr = grab_file_name(cap->count1, &lnum);
|
ptr = grab_file_name(cap->count1, &lnum);
|
||||||
|
|
||||||
|
@ -2425,8 +2425,16 @@ func Test_popupwin_terminal_buffer()
|
|||||||
call assert_equal(winnr(), winnr('k'))
|
call assert_equal(winnr(), winnr('k'))
|
||||||
call assert_equal(winnr(), winnr('h'))
|
call assert_equal(winnr(), winnr('h'))
|
||||||
call assert_equal(winnr(), winnr('l'))
|
call assert_equal(winnr(), winnr('l'))
|
||||||
|
|
||||||
" Cannot quit while job is running
|
" Cannot quit while job is running
|
||||||
call assert_fails('call feedkeys("\<C-W>:quit\<CR>", "xt")', 'E948:')
|
call assert_fails('call feedkeys("\<C-W>:quit\<CR>", "xt")', 'E948:')
|
||||||
|
|
||||||
|
" Cannot enter Terminal-Normal mode.
|
||||||
|
call feedkeys("xxx\<C-W>N", 'xt')
|
||||||
|
call assert_fails('call feedkeys("gf", "xt")', 'E863:')
|
||||||
|
call feedkeys("a\<C-U>", 'xt')
|
||||||
|
|
||||||
|
" Exiting shell closes popup window
|
||||||
call feedkeys("exit\<CR>", 'xt')
|
call feedkeys("exit\<CR>", 'xt')
|
||||||
" Wait for shell to exit
|
" Wait for shell to exit
|
||||||
sleep 100m
|
sleep 100m
|
||||||
|
@ -746,6 +746,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
743,
|
||||||
/**/
|
/**/
|
||||||
742,
|
742,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user