aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.lua
diff options
context:
space:
mode:
authorSean Dewar <seandewar@users.noreply.github.com>2022-01-09 22:48:29 +0000
committerSean Dewar <seandewar@users.noreply.github.com>2022-02-05 13:16:34 +0000
commit22f0725aac300ed9b249f995df7889f6c203d1e0 (patch)
treef417e4a24d7e1dc5db1da23d087b65eba3a7f2e8 /src/nvim/eval.lua
parent806a7c976d78da2bf7a46499452b4a3e30fae798 (diff)
downloadrneovim-22f0725aac300ed9b249f995df7889f6c203d1e0.tar.gz
rneovim-22f0725aac300ed9b249f995df7889f6c203d1e0.tar.bz2
rneovim-22f0725aac300ed9b249f995df7889f6c203d1e0.zip
vim-patch:8.1.2342: random number generator in Vim script is slow
Problem: Random number generator in Vim script is slow. Solution: Add rand() and srand(). (Yasuhiro Matsumoto, closes vim/vim#1277) https://github.com/vim/vim/commit/06b0b4bc27077013e9b4b48fd1d9b33e543ccf99 Add missing method call usage to builtin.txt. vim_time and test_settime is N/A. Add a modeline to test_random.vim. Use typval_T* over listitem_T* vars so we don't need to use TV_LIST_ITEM_TV all over the place... Remove NULL list checks (tv_list_len covers this).
Diffstat (limited to 'src/nvim/eval.lua')
-rw-r--r--src/nvim/eval.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/eval.lua b/src/nvim/eval.lua
index 18967b80f2..ef2b8a0cc0 100644
--- a/src/nvim/eval.lua
+++ b/src/nvim/eval.lua
@@ -273,6 +273,7 @@ return {
pyeval={args=1, base=1, func="f_py3eval"},
pyxeval={args=1, base=1, func="f_py3eval"},
perleval={args=1, base=1},
+ rand={args={0, 1}, base=1},
range={args={1, 3}, base=1},
readdir={args={1, 2}, base=1},
readfile={args={1, 3}, base=1},
@@ -348,6 +349,7 @@ return {
spellsuggest={args={1, 3}, base=1},
split={args={1, 3}, base=1},
sqrt={args=1, base=1, func="float_op_wrapper", data="&sqrt"},
+ srand={args={0, 1}, base=1},
stdpath={args=1},
str2float={args=1, base=1},
str2list={args={1, 2}, base=1},