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)
Files: src/eval.c
*** ../vim-7.4.1830/src/eval.c 2016-05-01 23:05:49.674360477 +0200
--- src/eval.c 2016-05-15 17:54:02.095029062 +0200
***************
*** 20733,20740 ****
static void
f_timer_stop(typval_T *argvars, typval_T *rettv UNUSED)
{
! timer_T *timer = find_timer(get_tv_number(&argvars[0]));
if (timer != NULL)
stop_timer(timer);
}
--- 20733,20746 ----
static void
f_timer_stop(typval_T *argvars, typval_T *rettv UNUSED)
{
! 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)
stop_timer(timer);
}
*** ../vim-7.4.1830/src/version.c 2016-05-11 21:04:59.808470643 +0200
--- src/version.c 2016-05-15 17:55:39.241966292 +0200
***************
*** 755,756 ****
--- 755,758 ----
{ /* Add new patch number below this line */
+ /**/
+ 1831,
/**/
--
Looking at Perl through Lisp glasses, Perl looks atrocious.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.