diff options
author | Bram Moolenaar <Bram@vim.org> | 2012-06-06 19:02:45 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2012-06-06 19:02:45 +0200 |
commit | 362ce4804819f39d5a4a21923577f3ccc59c8ad5 (patch) | |
tree | 7c3d79ed0e4334faa016c4ecaa97b3a00183b608 /src/structs.h | |
parent | 3b53dfb3b0743af7d6ae381a766e1bb2018fd01e (diff) | |
download | vim-git-362ce4804819f39d5a4a21923577f3ccc59c8ad5.tar.gz |
updated for version 7.3.545v7.3.545
Problem: When closing a window or buffer autocommands may close it too,
causing problems for where the autocommand was invoked from.
Solution: Add the w_closing and b_closing flags. When set disallow ":q" and
":close" to prevent recursive closing.
Diffstat (limited to 'src/structs.h')
-rw-r--r-- | src/structs.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/structs.h b/src/structs.h index 921a04935..abcb7045d 100644 --- a/src/structs.h +++ b/src/structs.h @@ -1201,6 +1201,10 @@ struct dictvar_S typedef struct qf_info_S qf_info_T; #endif +/* + * These are items normally related to a buffer. But when using ":ownsyntax" + * a window may have its own instance. + */ typedef struct { #ifdef FEAT_SYN_HL hashtab_T b_keywtab; /* syntax keywords hash table */ @@ -1290,6 +1294,10 @@ struct file_buffer int b_nwindows; /* nr of windows open on this buffer */ int b_flags; /* various BF_ flags */ +#ifdef FEAT_AUTOCMD + int b_closing; /* buffer is being closed, don't let + autocommands close it too. */ +#endif /* * b_ffname has the full path of the file (NULL for no name). @@ -1853,6 +1861,10 @@ struct window_S win_T *w_prev; /* link to previous window */ win_T *w_next; /* link to next window */ #endif +#ifdef FEAT_AUTOCMD + int w_closing; /* window is being closed, don't let + autocommands close it too. */ +#endif frame_T *w_frame; /* frame containing this window */ |