diff options
author | Jurica Bradaric <jurica.bradaric@avl.com> | 2017-03-05 16:25:40 +0100 |
---|---|---|
committer | Jurica Bradaric <jbradaric@gmail.com> | 2017-03-20 21:15:56 +0100 |
commit | 5b8ce2feed6b528bae4bceba6f234be000949971 (patch) | |
tree | 2763d110839192b2130a72d7f78b0bddf6f6b519 /runtime/doc/eval.txt | |
parent | 8924e75f3477b20f0ef4e3df64b56bf496b197ae (diff) | |
download | rneovim-5b8ce2feed6b528bae4bceba6f234be000949971.tar.gz rneovim-5b8ce2feed6b528bae4bceba6f234be000949971.tar.bz2 rneovim-5b8ce2feed6b528bae4bceba6f234be000949971.zip |
vim-patch:7.4.2180
Problem: There is no easy way to stop all timers. There is no way to
temporary pause a timer.
Solution: Add timer_stopall() and timer_pause().
https://github.com/vim/vim/commit/b73598e2f022a22fec512ea681c70d2775e8fd87
Diffstat (limited to 'runtime/doc/eval.txt')
-rw-r--r-- | runtime/doc/eval.txt | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 37ce0e1b5f..8d3bd6aeb7 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1947,7 +1947,7 @@ assert_exception( {error} [, {msg}]) none assert {error} is in v:exception assert_fails( {cmd} [, {error}]) none assert {cmd} fails assert_false({actual} [, {msg}]) none assert {actual} is false assert_inrange({lower}, {upper}, {actual} [, {msg}]) - none assert {actual} is inside the range + none assert {actual} is inside the range assert_match( {pat}, {text} [, {msg}]) none assert {pat} matches {text} assert_notequal( {exp}, {act} [, {msg}]) none assert {exp} is not equal {act} assert_notmatch( {pat}, {text} [, {msg}]) none assert {pat} not matches {text} @@ -2298,9 +2298,11 @@ tanh({expr}) Float hyperbolic tangent of {expr} tempname() String name for a temporary file test_garbagecollect_now() none free memory right now for testing timer_info([{id}]) List information about timers +timer_pause({id}, {pause}) none pause or unpause a timer timer_start({time}, {callback} [, {options}]) Number create a timer timer_stop({timer}) none stop a timer +timer_stopall() none stop all timers tolower({expr}) String the String {expr} switched to lowercase toupper({expr}) String the String {expr} switched to uppercase tr({src}, {fromstr}, {tostr}) String translate chars of {src} in {fromstr} @@ -7534,6 +7536,19 @@ timer_info([{id}]) -1 means forever "callback" the callback +timer_pause({timer}, {paused}) *timer_pause()* + Pause or unpause a timer. A paused timer does not invoke its + callback, while the time it would is not changed. Unpausing a + timer may cause the callback to be invoked almost immediately + if enough time has passed. + + Pausing a timer is useful to avoid the callback to be called + for a short time. + + If {paused} evaluates to a non-zero Number or a non-empty + String, then the timer is paused, otherwise it is unpaused. + See |non-zero-arg|. + *timer_start()* timer_start({time}, {callback} [, {options}]) Create a timer and return the timer ID. @@ -7565,6 +7580,11 @@ timer_stop({timer}) *timer_stop()* {timer} is an ID returned by timer_start(), thus it must be a Number. If {timer} does not exist there is no error. +timer_stopall() *timer_stopall()* + Stop all timers. The timer callbacks will no longer be + invoked. Useful if some timers is misbehaving. If there are + no timers there is no error. + tolower({expr}) *tolower()* The result is a copy of the String given, with all uppercase characters turned into lowercase (just like applying |gu| to |