diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-09-05 22:45:28 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-09-05 22:45:28 +0200 |
commit | 75537a93e985ef32e6c267b06ce93629855dd983 (patch) | |
tree | 80759514ecc4498257f04f3d23e82d8be31b8e6d /src/structs.h | |
parent | 33a80eeb859a78ba93432da6fa585786cfd77249 (diff) | |
download | vim-git-75537a93e985ef32e6c267b06ce93629855dd983.tar.gz |
patch 7.4.2332v7.4.2332
Problem: Crash when stop_timer() is called in a callback of a callback.
Vim hangs when the timer callback uses too much time.
Solution: Set tr_id to -1 when a timer is to be deleted. Don't keep calling
callbacks forever. (Ozaki Kiichi)
Diffstat (limited to 'src/structs.h')
-rw-r--r-- | src/structs.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/structs.h b/src/structs.h index a44bcec4c..8bdd3c9cb 100644 --- a/src/structs.h +++ b/src/structs.h @@ -3166,12 +3166,13 @@ typedef struct js_reader js_read_T; typedef struct timer_S timer_T; struct timer_S { - int tr_id; + long tr_id; #ifdef FEAT_TIMERS timer_T *tr_next; timer_T *tr_prev; proftime_T tr_due; /* when the callback is to be invoked */ - int tr_paused; /* when TRUE callback is not invoked */ + char tr_firing; /* when TRUE callback is being called */ + char tr_paused; /* when TRUE callback is not invoked */ int tr_repeat; /* number of times to repeat, -1 forever */ long tr_interval; /* msec */ char_u *tr_callback; /* allocated */ |