summaryrefslogtreecommitdiffstats
path: root/src/globals.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/globals.h')
-rw-r--r--src/globals.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/globals.h b/src/globals.h
index d9207b940f..eadff43c99 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -977,8 +977,18 @@ EXTERN win_T *prevwin INIT(= NULL); // previous window
EXTERN win_T *curwin; // currently active window
-EXTERN win_T *aucmd_win; // window used in aucmd_prepbuf()
-EXTERN int aucmd_win_used INIT(= FALSE); // aucmd_win is being used
+// When executing autocommands for a buffer that is not in any window, a
+// special window is created to handle the side effects. When autocommands
+// nest we may need more than one. Allow for up to five, if more are needed
+// something crazy is happening.
+#define AUCMD_WIN_COUNT 5
+
+typedef struct {
+ win_T *auc_win; // window used in aucmd_prepbuf()
+ int auc_win_used; // this auc_win is being used
+} aucmdwin_T;
+
+EXTERN aucmdwin_T aucmd_win[AUCMD_WIN_COUNT];
#ifdef FEAT_PROP_POPUP
EXTERN win_T *first_popupwin; // first global popup window