diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-08-24 15:45:33 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-08-24 15:56:17 -0400 |
commit | 01b5499eea24961f0163b0ca3728c649aad53bbf (patch) | |
tree | cc5cc5a9004414b9145825beee791f34a06cb66e /runtime | |
parent | 34e416667378a610943f614b97da9b865d622806 (diff) | |
download | rneovim-01b5499eea24961f0163b0ca3728c649aad53bbf.tar.gz rneovim-01b5499eea24961f0163b0ca3728c649aad53bbf.tar.bz2 rneovim-01b5499eea24961f0163b0ca3728c649aad53bbf.zip |
vim-patch:7.4.1407
Problem: json_encode() does not handle NaN and inf properly. (David
Barnett)
Solution: For JSON turn them into "null". For JS use "NaN" and "Infinity".
Add isnan().
https://github.com/vim/vim/commit/f1b6ac72293e658bb6e68c5cfd926c405b1b6f34
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/eval.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index de2650baa4..811dbad559 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -2190,6 +2190,7 @@ insert({list}, {item} [, {idx}]) invert({expr}) Number bitwise invert isdirectory({directory}) Number |TRUE| if {directory} is a directory islocked({expr}) Number |TRUE| if {expr} is locked +isnan({expr}) Number |TRUE| if {expr} is NaN id({expr}) String identifier of the container items({dict}) List key-value pairs in {dict} jobpid({id}) Number Returns pid of a job. @@ -5319,6 +5320,10 @@ items({dict}) *items()* entry and the value of this entry. The |List| is in arbitrary order. +isnan({expr}) *isnan()* + Return |TRUE| if {expr} is a float with value NaN. > + echo isnan(0.0 / 0.0) +< 1 jobpid({job}) *jobpid()* Return the PID (process id) of |job-id| {job}. |