Skip to content

Commit 3a2505c

Browse files
committed
patch 8.2.0367: can use :pedit in a popup window
Problem: Can use :pedit in a popup window. Solution: Disallow it.
1 parent 2e09634 commit 3a2505c

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

src/ex_docmd.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7886,6 +7886,9 @@ ex_pedit(exarg_T *eap)
78867886
{
78877887
win_T *curwin_save = curwin;
78887888

7889+
if (ERROR_IF_ANY_POPUP_WINDOW)
7890+
return;
7891+
78897892
// Open the preview window or popup and make it the current window.
78907893
g_do_tagpreview = p_pvh;
78917894
prepare_tagpreview(TRUE, TRUE, FALSE);

src/testdir/test_popupwin.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -926,6 +926,7 @@ func Test_win_execute_not_allowed()
926926
call assert_fails('call win_execute(winid, "tabnext")', 'E994:')
927927
call assert_fails('call win_execute(winid, "next")', 'E994:')
928928
call assert_fails('call win_execute(winid, "rewind")', 'E994:')
929+
call assert_fails('call win_execute(winid, "pedit filename")', 'E994:')
929930
call assert_fails('call win_execute(winid, "buf")', 'E994:')
930931
call assert_fails('call win_execute(winid, "bnext")', 'E994:')
931932
call assert_fails('call win_execute(winid, "bprev")', 'E994:')

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,8 @@ static char *(features[]) =
738738

739739
static int included_patches[] =
740740
{ /* Add new patch number below this line */
741+
/**/
742+
367,
741743
/**/
742744
366,
743745
/**/

0 commit comments

Comments
 (0)