timers: make repeat=0 work one-shot (consistent with vim)

This commit is contained in:
Björn Linse
2016-06-05 10:59:40 +02:00
parent 2c39e0b03f
commit 5c754a2d22
2 changed files with 11 additions and 0 deletions

View File

@@ -16639,6 +16639,9 @@ static void f_timer_start(typval_T *argvars, typval_T *rettv)
}
if (dict_find(dict, (char_u *)"repeat", -1) != NULL) {
repeat = get_dict_number(dict, (char_u *)"repeat");
if (repeat == 0) {
repeat = 1;
}
}
}