Mercurial > vim
comparison src/time.c @ 22157:ba81f5e300b7 v8.2.1628
patch 8.2.1628: Vim9: cannot pass "true" to timer_paused()
Commit: https://github.com/vim/vim/commit/418155def2aa45afd7fc034db341dc874b00af3a
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Sep 6 18:39:38 2020 +0200
patch 8.2.1628: Vim9: cannot pass "true" to timer_paused()
Problem: Vim9: cannot pass "true" to timer_paused().
Solution: Use tv_get_bool(). (closes https://github.com/vim/vim/issues/6891)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 06 Sep 2020 18:45:03 +0200 |
parents | 2e7acc208a1f |
children | 20ccf5f7dc6d |
comparison
equal
deleted
inserted
replaced
22156:76e97e930c32 | 22157:ba81f5e300b7 |
---|---|
740 */ | 740 */ |
741 void | 741 void |
742 f_timer_pause(typval_T *argvars, typval_T *rettv UNUSED) | 742 f_timer_pause(typval_T *argvars, typval_T *rettv UNUSED) |
743 { | 743 { |
744 timer_T *timer = NULL; | 744 timer_T *timer = NULL; |
745 int paused = (int)tv_get_number(&argvars[1]); | 745 int paused = (int)tv_get_bool(&argvars[1]); |
746 | 746 |
747 if (argvars[0].v_type != VAR_NUMBER) | 747 if (argvars[0].v_type != VAR_NUMBER) |
748 emsg(_(e_number_exp)); | 748 emsg(_(e_number_exp)); |
749 else | 749 else |
750 { | 750 { |