summaryrefslogtreecommitdiffstats
path: root/src/ex_cmds2.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-09-14 22:55:37 +0200
committerBram Moolenaar <Bram@vim.org>2017-09-14 22:55:37 +0200
commitf5291f301e9322545f0621b2157e93050d1d4fb3 (patch)
tree64be20f0ac902e1b1a4cf2570ee1a4d5dde0cb14 /src/ex_cmds2.c
parent69fbc9e1dab176f345719436cd89d854df0a2abd (diff)
patch 8.0.1109: timer causes error on exit from Ex modev8.0.1109
Problem: Timer causes error on exit from Ex mode. (xtal8) Solution: save and restore the ex_pressedreturn flag. (Christian Brabandt, closes #2079)
Diffstat (limited to 'src/ex_cmds2.c')
-rw-r--r--src/ex_cmds2.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c
index 710a2789e8..f0a2a518d5 100644
--- a/src/ex_cmds2.c
+++ b/src/ex_cmds2.c
@@ -1224,6 +1224,7 @@ check_due_timer(void)
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
@@ -1257,6 +1258,7 @@ check_due_timer(void)
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). */