diff options
author | Bram Moolenaar <Bram@vim.org> | 2005-12-18 22:02:33 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2005-12-18 22:02:33 +0000 |
commit | d35f9711d4558f8784e65531a152d38d1dabbe72 (patch) | |
tree | b87fb3537c2ac512ca97a6e342c1cb9762e40892 /src/fileio.c | |
parent | da1b1a735765071185281ce86a379ea0d078cb17 (diff) | |
download | vim-d35f9711d4558f8784e65531a152d38d1dabbe72.zip |
updated for version 7.0173
Diffstat (limited to 'src/fileio.c')
-rw-r--r-- | src/fileio.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/fileio.c b/src/fileio.c index 0cfbc2222..5b083f950 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -7483,6 +7483,8 @@ au_event_restore(old_ei) * :autocmd bufleave * set tw=79 nosmartindent ic infercase * * :autocmd * *.c show all autocommands for *.c files. + * + * Mostly a {group} argument can optionally appear before <event>. */ void do_autocmd(arg, forceit) @@ -8168,11 +8170,26 @@ apply_autocmds_retval(event, fname, fname_io, force, buf, retval) } #if defined(FEAT_AUTOCMD) || defined(PROTO) +/* + * Return TRUE when there is a CursorHold autocommand defined. + */ int has_cursorhold() { return (first_autopat[(int)EVENT_CURSORHOLD] != NULL); } + +/* + * Return TRUE if the CursorHold event can be triggered. + */ + int +trigger_cursorhold() +{ + return (!did_cursorhold + && has_cursorhold() + && !Recording + && get_real_state() == NORMAL_BUSY); +} #endif static int |