summaryrefslogtreecommitdiff
path: root/src/window.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-06-01 14:15:52 +0200
committerBram Moolenaar <Bram@vim.org>2019-06-01 14:15:52 +0200
commit815b76bff618c07226653e11f29c4d3c5640b63a (patch)
treefbe1ffe3d0c5d15914bf9e7aaee5bc007e9390ab /src/window.c
parent3a97bb3f0f8bd118ae23f1c97e55d84ff42eef20 (diff)
downloadvim-git-815b76bff618c07226653e11f29c4d3c5640b63a.tar.gz
patch 8.1.1438: some commands cause trouble in a popup windowv8.1.1438
Problem: Some commands cause trouble in a popup window. Solution: Add NOT_IN_POPUP_WINDOW.
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/window.c b/src/window.c
index e73a9f492..42689ee0b 100644
--- a/src/window.c
+++ b/src/window.c
@@ -87,7 +87,8 @@ do_window(
#endif
char_u cbuf[40];
- Prenum1 = Prenum == 0 ? 1 : Prenum;
+ if (NOT_IN_POPUP_WINDOW)
+ return;
#ifdef FEAT_CMDWIN
# define CHECK_CMDWIN \
@@ -102,6 +103,8 @@ do_window(
# define CHECK_CMDWIN do { /**/ } while (0)
#endif
+ Prenum1 = Prenum == 0 ? 1 : Prenum;
+
switch (nchar)
{
/* split current window in two parts, horizontally */
@@ -732,6 +735,9 @@ cmd_with_count(
int
win_split(int size, int flags)
{
+ if (NOT_IN_POPUP_WINDOW)
+ return FAIL;
+
/* When the ":tab" modifier was used open a new tab page instead. */
if (may_open_tabpage() == OK)
return OK;
@@ -1509,7 +1515,9 @@ win_exchange(long Prenum)
win_T *wp2;
int temp;
- if (ONE_WINDOW) /* just one window */
+ if (NOT_IN_POPUP_WINDOW)
+ return;
+ if (ONE_WINDOW) // just one window
{
beep_flush();
return;
@@ -2363,6 +2371,9 @@ win_close(win_T *win, int free_buf)
tabpage_T *prev_curtab = curtab;
frame_T *win_frame = win->w_frame->fr_parent;
+ if (NOT_IN_POPUP_WINDOW)
+ return FAIL;
+
if (last_window())
{
emsg(_("E444: Cannot close last window"));
@@ -4221,6 +4232,8 @@ win_goto(win_T *wp)
win_T *owp = curwin;
#endif
+ if (NOT_IN_POPUP_WINDOW)
+ return;
if (text_locked())
{
beep_flush();