Andy Wokula wrote:

> Am 15.09.2019 um 23:02 schrieb Bram Moolenaar:
> > Patch 8.1.2044
> > Problem:    No easy way to process postponed work. (Paul Jolly)
> > Solution:   Add the SafeState autocommand event.
> > Files:          runtime/doc/autocmd.txt, src/main.c, src/proto/main.pro,
> >              src/vim.h, src/autocmd.c, src/channel.c, src/edit.c,
> >              src/ex_getln.c
> >
> >
> > *** ../vim-8.1.2043/runtime/doc/autocmd.txt 2019-09-09 18:35:28.119252725 
> > +0200
> > --- runtime/doc/autocmd.txt 2019-09-15 21:50:17.266633152 +0200
> > ***************
> > *** 355,360 ****
> > --- 355,363 ----
> >                     when popup menu visible
> >    |TextYankPost|           after text has been yanked or deleted
> >
> > + |SafeState|               nothing pending, going to wait for the user to 
> > type a
> > +                   character
> > +
> >    |ColorSchemePre| before loading a color scheme
> >    |ColorScheme|            after loading a color scheme
> >
> > ***************
> > *** 956,961 ****
> > --- 958,984 ----
> >                             Note that even if an autocommand is defined,
> >                             the reply should be read with |remote_read()|
> >                             to consume it.
> > +                                                   *SafeState*
> > + SafeState                 When nothing is pending, going to wait for the
> > +                           user to type a character.
> > +                           This will not be triggered when:
> > +                           - an operator is pending
> > +                           - a register was entered with "r
> > +                           - halfway executing a command
> > +                           - executing a mapping
> > +                           - there is typeahead
> > +                           - Insert mode completion is active
> > +                           - Command line completion is active
> > +                           You can use `mode()` to find out what state
> > +                           Vim is in.  That may be:
> > +                           - VIsual mode
> > +                           - Normal mode
> > +                           - Insert mode
> > +                           - Command-line mode
> > +                           Depending on what you want to do, you may also
> > +                           check more with `state()`, e.g. whether the
> > +                           screen was scrolled for messages.
> > +
> 
> What about CursorHold?  Is this before or after (in case CursorHold is about 
> to be triggered at all)?
>  From your description I guess it's before CursorHold.
> 
> (not sure if a CursorHold event is considered "pending")

I don't think we should define exactly when it is triggered.  It may
change over time.

-- 
There is a fine line between courage and foolishness.
Unfortunately, it's not a fence.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/201909161814.x8GIE6Ua016656%40masaka.moolenaar.net.

Raspunde prin e-mail lui