eval: Fix jobwait()

- Properly save job event deferring state for recursive calls
- Disable breakcheck while running. Breakcheck can invoke job callbacks
  in unexpected places.
This commit is contained in:
Thiago de Arruda
2015-04-10 23:19:04 -03:00
parent 17db7f1e14
commit ccd42e81c8
4 changed files with 72 additions and 8 deletions

View File

@@ -898,6 +898,14 @@ EXTERN FILE *scriptout INIT(= NULL); /* stream to write script to */
/* volatile because it is used in signal handler catch_sigint(). */
EXTERN volatile int got_int INIT(= FALSE); /* set to TRUE when interrupt
signal occurred */
EXTERN int disable_breakcheck INIT(= 0); // > 0 if breakchecks should be
// ignored. FIXME(tarruda): Hacky
// way to run functions that would
// result in *_breakcheck calls
// while events that would normally
// be deferred are being processed
// immediately. Ref:
// neovim/neovim#2371
EXTERN int bangredo INIT(= FALSE); /* set to TRUE with ! command */
EXTERN int searchcmdlen; /* length of previous search cmd */
EXTERN int reg_do_extmatch INIT(= 0); /* Used when compiling regexp: