int save_must_redraw = must_redraw;
int save_trylevel = trylevel;
int save_did_throw = did_throw;
+ int save_ex_pressedreturn = get_pressedreturn();
except_T *save_current_exception = current_exception;
/* Create a scope for running the timer callback, ignoring most of
need_update_screen = TRUE;
must_redraw = must_redraw > save_must_redraw
? must_redraw : save_must_redraw;
+ set_pressedreturn(save_ex_pressedreturn);
/* Only fire the timer again if it repeats and stop_timer() wasn't
* called while inside the callback (tr_id == -1). */
#endif
}
#endif
+
+# if defined(FEAT_TIMERS) || defined(PROTO)
+ int
+get_pressedreturn(void)
+{
+ return ex_pressedreturn;
+}
+
+ void
+set_pressedreturn(int val)
+{
+ ex_pressedreturn = val;
+}
+#endif
char_u *get_behave_arg(expand_T *xp, int idx);
char_u *get_messages_arg(expand_T *xp, int idx);
char_u *get_mapclear_arg(expand_T *xp, int idx);
+int get_pressedreturn(void);
+void set_pressedreturn(int val);
/* vim: set ft=c : */
call timer_stop(intr)
endfunc
+func Test_ex_mode()
+ " Function with an empty line.
+ func Foo(...)
+
+ endfunc
+ let timer = timer_start(40, function('g:Foo'), {'repeat':-1})
+ " This used to throw error E749.
+ exe "normal Qsleep 100m\rvi\r"
+ call timer_stop(timer)
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1109,
/**/
1108,
/**/