forked from aniani/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().
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 7.4. Last change: 2016 Aug 06
|
||||
*eval.txt* For Vim version 7.4. Last change: 2016 Aug 07
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1969,7 +1969,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}
|
||||
@@ -2340,9 +2340,11 @@ test_null_partial() Funcref null value for testing
|
||||
test_null_string() String null value for testing
|
||||
test_settime({expr}) none set current time 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}
|
||||
@@ -7555,8 +7557,26 @@ timer_info([{id}])
|
||||
"time" time the timer was started with
|
||||
"remaining" time until the timer fires
|
||||
"repeat" number of times the timer will still fire;
|
||||
-1 means forever
|
||||
-1 means forever
|
||||
"callback" the callback
|
||||
"paused" 1 if the timer is paused, 0 otherwise
|
||||
|
||||
{only available when compiled with the |+timers| feature}
|
||||
|
||||
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|.
|
||||
|
||||
{only available when compiled with the |+timers| feature}
|
||||
|
||||
*timer_start()*
|
||||
timer_start({time}, {callback} [, {options}])
|
||||
@@ -7583,6 +7603,7 @@ timer_start({time}, {callback} [, {options}])
|
||||
\ {'repeat': 3})
|
||||
< This will invoke MyHandler() three times at 500 msec
|
||||
intervals.
|
||||
|
||||
{only available when compiled with the |+timers| feature}
|
||||
|
||||
timer_stop({timer}) *timer_stop()*
|
||||
@@ -7590,6 +7611,15 @@ 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.
|
||||
|
||||
{only available when compiled with the |+timers| feature}
|
||||
|
||||
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.
|
||||
|
||||
{only available when compiled with the |+timers| feature}
|
||||
|
||||
tolower({expr}) *tolower()*
|
||||
The result is a copy of the String given, with all uppercase
|
||||
characters turned into lowercase (just like applying |gu| to
|
||||
|
||||
Reference in New Issue
Block a user