diff options
Diffstat (limited to 'src/nvim/globals.h')
-rw-r--r-- | src/nvim/globals.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/nvim/globals.h b/src/nvim/globals.h index 9fcde4f17a..8f9fa6673c 100644 --- a/src/nvim/globals.h +++ b/src/nvim/globals.h @@ -422,19 +422,18 @@ EXTERN win_T *prevwin INIT(= NULL); // previous window EXTERN win_T *curwin; // currently active window -/// 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. -enum { AUCMD_WIN_COUNT = 5, }; - typedef struct { win_T *auc_win; ///< Window used in aucmd_prepbuf(). When not NULL the ///< window has been allocated. bool auc_win_used; ///< This auc_win is being used. } aucmdwin_T; -EXTERN aucmdwin_T aucmd_win[AUCMD_WIN_COUNT]; +/// 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. +EXTERN kvec_t(aucmdwin_T) aucmd_win_vec INIT(= KV_INITIAL_VALUE); +#define aucmd_win (aucmd_win_vec.items) +#define AUCMD_WIN_COUNT ((int)aucmd_win_vec.size) // The window layout is kept in a tree of frames. topframe points to the top // of the tree. |