aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-04-10 00:50:51 +0200
committerJustin M. Keyes <justinkz@gmail.com>2019-04-10 00:50:51 +0200
commit9d085c75ff427bf0ccc408983ce7b68f0a2b284d (patch)
tree66ff0f2aa1cd79ef8ec19f80ab473d7be770cd60 /runtime
parentae2401621abbf530f5abd1ad8ce822b739b02cc4 (diff)
downloadrneovim-9d085c75ff427bf0ccc408983ce7b68f0a2b284d.tar.gz
rneovim-9d085c75ff427bf0ccc408983ce7b68f0a2b284d.tar.bz2
rneovim-9d085c75ff427bf0ccc408983ce7b68f0a2b284d.zip
vim-patch:8.0.0702: error in a timer can make Vim unusable #9826
Problem: An error in a timer can make Vim unusable. Solution: Don't set the error flag or exception from a timer. Stop a timer if it causes an error 3 out of 3 times. Discard an exception caused inside a timer. https://github.com/vim/vim/commit/c577d813b7978345dec4310b2d8f5d5624a681f6 closes #9826
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/eval.txt16
1 files changed, 10 insertions, 6 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index f11ce2de09..8c81f35331 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -4007,14 +4007,14 @@ getchar([expr]) *getchar()*
not consumed. Return zero if no character available.
Without [expr] and when [expr] is 0 a whole character or
- special key is returned. If it is an 8-bit character, the
+ special key is returned. If it is a single character, the
result is a number. Use nr2char() to convert it to a String.
Otherwise a String is returned with the encoded character.
- For a special key it's a sequence of bytes starting with 0x80
- (decimal: 128). This is the same value as the string
- "\<Key>", e.g., "\<Left>". The returned value is also a
- String when a modifier (shift, control, alt) was used that is
- not included in the character.
+ For a special key it's a String with a sequence of bytes
+ starting with 0x80 (decimal: 128). This is the same value as
+ the String "\<Key>", e.g., "\<Left>". The returned value is
+ also a String when a modifier (shift, control, alt) was used
+ that is not included in the character.
When [expr] is 0 and Esc is typed, there will be a short delay
while Vim waits to see if this is the start of an escape
@@ -8096,6 +8096,10 @@ timer_start({time}, {callback} [, {options}])
"repeat" Number of times to repeat calling the
callback. -1 means forever. When not present
the callback will be called once.
+ If the timer causes an error three times in a
+ row the repeat is cancelled. This avoids that
+ Vim becomes unusable because of all the error
+ messages.
Example: >
func MyHandler(timer)