aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSean Dewar <seandewar@users.noreply.github.com>2021-11-01 22:15:53 +0000
committerSean Dewar <seandewar@users.noreply.github.com>2021-11-26 18:53:12 +0000
commit752ca2cb9f61b4dc523552d4123729b9b26a3409 (patch)
treec639a484a464e6ed146e2182afe750b652b9ae85 /src
parent7e1a2301fffa32d60ecb7c15891a106d717100db (diff)
downloadrneovim-752ca2cb9f61b4dc523552d4123729b9b26a3409.tar.gz
rneovim-752ca2cb9f61b4dc523552d4123729b9b26a3409.tar.bz2
rneovim-752ca2cb9f61b4dc523552d4123729b9b26a3409.zip
fix(eval/method): add missing method support for existing built-ins
These functions were ported with the vim-patch token, but didn't actually port the method call support that was in their patches (method call syntax wasn't ported yet). Add the missing method call support and latest docs for: - assert_nobeep: https://github.com/vim/vim/commit/5b8cabfef7c3707f3e53e13844d90e5a217e1e84 - buffer_name, buffer_number: (obsolete) https://github.com/vim/vim/commit/a8eee21e75324d199acb1663cb5009e03014a13a - charidx: https://github.com/vim/vim/commit/17793ef23aae0bc94539390ccfe5e63b0ad39ff2 - flatten: https://github.com/vim/vim/commit/077a1e670ad69ef4cefc22103ca6635bd269e764 - prompt_getprompt: https://github.com/vim/vim/commit/077cc7aa0e0c431e97795612374fe17fe7c88803 - searchcount: https://github.com/vim/vim/commit/e8f5ec0d30b629d7166f0ad03434065d8bc822df - strptime: https://github.com/vim/vim/commit/10455d43fef041309ce0613fa792c635dd71e3a8 - win_gettype: https://github.com/vim/vim/commit/00f3b4e007af07870168bf044cecc9d544483953 - win_splitmove: https://github.com/vim/vim/commit/d20dcb3d011da6111153109f6e46fbd5c7fe9fb6 Also fix assert_beeps, assert_nobeep and getenv to accept exactly one argument. Previously, they could erroneously accept one or more.
Diffstat (limited to 'src')
-rw-r--r--src/nvim/eval.lua24
-rw-r--r--src/nvim/testdir/test_prompt_buffer.vim4
2 files changed, 13 insertions, 15 deletions
diff --git a/src/nvim/eval.lua b/src/nvim/eval.lua
index 75e28df98f..9a76b67de6 100644
--- a/src/nvim/eval.lua
+++ b/src/nvim/eval.lua
@@ -33,7 +33,7 @@ return {
arglistid={args={0, 2}},
argv={args={0, 2}},
asin={args=1, base=1, func="float_op_wrapper", data="&asin"}, -- WJMc
- assert_beeps={args={1}, base=1},
+ assert_beeps={args=1, base=1},
assert_equal={args={2, 3}, base=2},
assert_equalfile={args={2, 3}, base=1},
assert_exception={args={1, 2}},
@@ -41,7 +41,7 @@ return {
assert_false={args={1, 2}, base=1},
assert_inrange={args={3, 4}, base=3},
assert_match={args={2, 3}, base=2},
- assert_nobeep={args={1}},
+ assert_nobeep={args=1, base=1},
assert_notequal={args={2, 3}, base=2},
assert_notmatch={args={2, 3}, base=2},
assert_report={args=1, base=1},
@@ -53,8 +53,8 @@ return {
bufadd={args=1, base=1},
bufexists={args=1, base=1},
buffer_exists={args=1, base=1, func='f_bufexists'}, -- obsolete
- buffer_name={args={0, 1}, func='f_bufname'}, -- obsolete
- buffer_number={args={0, 1}, func='f_bufnr'}, -- obsolete
+ buffer_name={args={0, 1}, base=1, func='f_bufname'}, -- obsolete
+ buffer_number={args={0, 1}, base=1, func='f_bufnr'}, -- obsolete
buflisted={args=1, base=1},
bufload={args=1, base=1},
bufloaded={args=1, base=1},
@@ -71,7 +71,7 @@ return {
chanclose={args={1, 2}},
chansend={args=2},
char2nr={args={1, 2}, base=1},
- charidx={args={2, 3}},
+ charidx={args={2, 3}, base=1},
chdir={args=1, base=1},
cindent={args=1, base=1},
clearmatches={args={0, 1}, base=1},
@@ -121,7 +121,7 @@ return {
filter={args=2, base=1},
finddir={args={1, 3}, base=1},
findfile={args={1, 3}, base=1},
- flatten={args={1, 2}},
+ flatten={args={1, 2}, base=1},
float2nr={args=1, base=1},
floor={args=1, base=1, func="float_op_wrapper", data="&floor"},
fmod={args=2, base=1},
@@ -152,7 +152,7 @@ return {
getcompletion={args={2, 3}, base=1},
getcurpos={},
getcwd={args={0, 2}, base=1},
- getenv={args={1}, base=1},
+ getenv={args=1, base=1},
getfontname={args={0, 1}},
getfperm={args=1, base=1},
getfsize={args=1, base=1},
@@ -262,7 +262,7 @@ return {
pow={args=2, base=1},
prevnonblank={args=1, base=1},
printf={args=varargs(1), base=2},
- prompt_getprompt={args=1},
+ prompt_getprompt={args=1, base=1},
prompt_setcallback={args={2, 2}, base=1},
prompt_setinterrupt={args={2, 2}, base=1},
prompt_setprompt={args={2, 2}, base=1},
@@ -299,7 +299,7 @@ return {
screenrow={},
screenstring={args=2, base=1},
search={args={1, 4}, base=1},
- searchcount={args={0,1}},
+ searchcount={args={0, 1}, base=1},
searchdecl={args={1, 3}, base=1},
searchpair={args={3, 7}},
searchpairpos={args={3, 7}},
@@ -359,7 +359,7 @@ return {
string={args=1, base=1},
strlen={args=1, base=1},
strpart={args={2, 4}, base=1},
- strptime={args=2},
+ strptime={args=2, base=1},
strridx={args={2, 3}, base=1},
strtrans={args=1, base=1},
strwidth={args=1, base=1},
@@ -407,12 +407,12 @@ return {
win_execute={args={2, 3}, base=2},
win_findbuf={args=1, base=1},
win_getid={args={0, 2}, base=1},
- win_gettype={args={0,1}},
+ win_gettype={args={0, 1}, base=1},
win_gotoid={args=1, base=1},
win_id2tabwin={args=1, base=1},
win_id2win={args=1, base=1},
win_screenpos={args=1, base=1},
- win_splitmove={args={2, 3}},
+ win_splitmove={args={2, 3}, base=1},
winbufnr={args=1, base=1},
wincol={},
windowsversion={},
diff --git a/src/nvim/testdir/test_prompt_buffer.vim b/src/nvim/testdir/test_prompt_buffer.vim
index 3da46eb1a6..c59a00afcc 100644
--- a/src/nvim/testdir/test_prompt_buffer.vim
+++ b/src/nvim/testdir/test_prompt_buffer.vim
@@ -165,9 +165,7 @@ func Test_prompt_buffer_getbufinfo()
call assert_equal('This is a test: ', prompt_getprompt('%'))
call prompt_setprompt( bufnr( '%' ), '' )
- " Nvim doesn't support method call syntax yet.
- " call assert_equal('', '%'->prompt_getprompt())
- call assert_equal('', prompt_getprompt('%'))
+ call assert_equal('', '%'->prompt_getprompt())
call prompt_setprompt( bufnr( '%' ), 'Another: ' )
call assert_equal('Another: ', prompt_getprompt('%'))