0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 7.4.1860

Problem:    Using a partial for timer_start() may cause a crash.
Solution:   Set the copyID in timer objects. (Ozaki Kiichi)
This commit is contained in:
Bram Moolenaar
2016-05-31 21:13:04 +02:00
parent ef3abc6442
commit e3188e2615
5 changed files with 36 additions and 0 deletions

View File

@@ -1252,6 +1252,25 @@ stop_timer(timer_T *timer)
remove_timer(timer);
free_timer(timer);
}
/*
* Mark references in partials of timers.
*/
int
set_ref_in_timer(int copyID)
{
int abort = FALSE;
timer_T *timer;
typval_T tv;
for (timer = first_timer; timer != NULL; timer = timer->tr_next)
{
tv.v_type = VAR_PARTIAL;
tv.vval.v_partial = timer->tr_partial;
abort = abort || set_ref_in_item(&tv, copyID, NULL, NULL);
}
return abort;
}
# endif
#if defined(FEAT_SYN_HL) && defined(FEAT_RELTIME) && defined(FEAT_FLOAT)