0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

patch 7.4.1831

Problem:    When timer_stop() is called with a string there is no proper error
            message.
Solution:   Require getting a number. (Bjorn Linse)
This commit is contained in:
Bram Moolenaar 2016-05-15 18:00:19 +02:00
parent 73a733e08b
commit e40d75f6ef
2 changed files with 9 additions and 1 deletions

View File

@ -20733,8 +20733,14 @@ f_timer_start(typval_T *argvars, typval_T *rettv)
static void static void
f_timer_stop(typval_T *argvars, typval_T *rettv UNUSED) f_timer_stop(typval_T *argvars, typval_T *rettv UNUSED)
{ {
timer_T *timer = find_timer(get_tv_number(&argvars[0])); timer_T *timer;
if (argvars[0].v_type != VAR_NUMBER)
{
EMSG(_(e_number_exp));
return;
}
timer = find_timer(get_tv_number(&argvars[0]));
if (timer != NULL) if (timer != NULL)
stop_timer(timer); stop_timer(timer);
} }

View File

@ -753,6 +753,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
1831,
/**/ /**/
1830, 1830,
/**/ /**/