From c0d60526541a3cf977ae623471ae4a347b492af1 Mon Sep 17 00:00:00 2001 From: bfredl Date: Tue, 23 Aug 2022 09:33:08 +0200 Subject: perf(api): allow to use an arena for return values --- src/nvim/eval.lua | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'src/nvim/eval.lua') diff --git a/src/nvim/eval.lua b/src/nvim/eval.lua index e4e9b34ec6..4863d8013d 100644 --- a/src/nvim/eval.lua +++ b/src/nvim/eval.lua @@ -23,7 +23,7 @@ end return { funcs={ abs={args=1, base=1}, - acos={args=1, base=1, func="float_op_wrapper", data="&acos"}, -- WJMc + acos={args=1, base=1, float_func="acos"}, -- WJMc add={args=2, base=1}, ['and']={args=2, base=1}, api_info={}, @@ -33,7 +33,7 @@ return { argidx={}, arglistid={args={0, 2}}, argv={args={0, 2}}, - asin={args=1, base=1, func="float_op_wrapper", data="&asin"}, -- WJMc + asin={args=1, base=1, float_func="asin"}, -- WJMc assert_beeps={args=1, base=1}, assert_equal={args={2, 3}, base=2}, assert_equalfile={args={2, 3}, base=1}, @@ -47,7 +47,7 @@ return { assert_notmatch={args={2, 3}, base=2}, assert_report={args=1, base=1}, assert_true={args={1, 2}, base=1}, - atan={args=1, base=1, func="float_op_wrapper", data="&atan"}, + atan={args=1, base=1, float_func="atan"}, atan2={args=2, base=1}, browse={args=4}, browsedir={args=2}, @@ -67,7 +67,7 @@ return { byteidx={args=2, base=1}, byteidxcomp={args=2, base=1}, call={args={2, 3}, base=1}, - ceil={args=1, base=1, func="float_op_wrapper", data="&ceil"}, + ceil={args=1, base=1, float_func="ceil"}, changenr={}, chanclose={args={1, 2}}, chansend={args=2}, @@ -85,8 +85,8 @@ return { complete_info={args={0, 1}, base=1}, confirm={args={1, 4}, base=1}, copy={args=1, base=1}, - cos={args=1, base=1, func="float_op_wrapper", data="&cos"}, - cosh={args=1, base=1, func="float_op_wrapper", data="&cosh"}, + cos={args=1, base=1, float_func="cos"}, + cosh={args=1, base=1, float_func="cosh"}, count={args={2, 4}, base=1}, cscope_connection={args={0, 3}}, ctxget={args={0, 1}}, @@ -117,7 +117,7 @@ return { execute={args={1, 2}, base=1}, exepath={args=1, base=1}, exists={args=1, base=1}, - exp={args=1, base=1, func="float_op_wrapper", data="&exp"}, + exp={args=1, base=1, float_func="exp"}, expand={args={1, 3}, base=1}, expandcmd={args=1, base=1}, extend={args={2, 3}, base=1}, @@ -130,7 +130,7 @@ return { findfile={args={1, 3}, base=1}, flatten={args={1, 2}, base=1}, float2nr={args=1, base=1}, - floor={args=1, base=1, func="float_op_wrapper", data="&floor"}, + floor={args=1, base=1, float_func="floor"}, fmod={args=2, base=1}, fnameescape={args=1, base=1}, fnamemodify={args=2, base=1}, @@ -245,8 +245,8 @@ return { lispindent={args=1, base=1}, list2str={args={1, 2}, base=1}, localtime={}, - log={args=1, base=1, func="float_op_wrapper", data="&log"}, - log10={args=1, base=1, func="float_op_wrapper", data="&log10"}, + log={args=1, base=1, float_func="log"}, + log10={args=1, base=1, float_func="log10"}, luaeval={args={1, 2}, base=1}, map={args=2, base=1}, maparg={args={1, 4}, base=1}, @@ -304,7 +304,7 @@ return { ['repeat']={args=2, base=1}, resolve={args=1, base=1}, reverse={args=1, base=1}, - round={args=1, base=1, func="float_op_wrapper", data="&round"}, + round={args=1, base=1, float_func="round"}, rpcnotify={args=varargs(2)}, rpcrequest={args=varargs(2)}, rpcstart={args={1, 2}}, @@ -358,8 +358,8 @@ return { sign_unplace={args={1, 2}, base=1}, sign_unplacelist={args=1, base=1}, simplify={args=1, base=1}, - sin={args=1, base=1, func="float_op_wrapper", data="&sin"}, - sinh={args=1, base=1, func="float_op_wrapper", data="&sinh"}, + sin={args=1, base=1, float_func="sin"}, + sinh={args=1, base=1, float_func="sinh"}, sockconnect={args={2,3}}, sort={args={1, 3}, base=1}, soundfold={args=1, base=1}, @@ -367,7 +367,7 @@ return { spellbadword={args={0, 1}, base=1}, spellsuggest={args={1, 3}, base=1}, split={args={1, 3}, base=1}, - sqrt={args=1, base=1, func="float_op_wrapper", data="&sqrt"}, + sqrt={args=1, base=1, float_func="sqrt"}, srand={args={0, 1}, base=1}, stdpath={args=1}, str2float={args=1, base=1}, @@ -402,8 +402,8 @@ return { tabpagewinnr={args={1, 2}, base=1}, tagfiles={}, taglist={args={1, 2}, base=1}, - tan={args=1, base=1, func="float_op_wrapper", data="&tan"}, - tanh={args=1, base=1, func="float_op_wrapper", data="&tanh"}, + tan={args=1, base=1, float_func="tan"}, + tanh={args=1, base=1, float_func="tanh"}, tempname={}, termopen={args={1, 2}}, test_garbagecollect_now={}, @@ -417,7 +417,7 @@ return { toupper={args=1, base=1}, tr={args=3, base=1}, trim={args={1, 3}, base=1}, - trunc={args=1, base=1, func="float_op_wrapper", data="&trunc"}, + trunc={args=1, base=1, float_func="trunc"}, type={args=1, base=1}, undofile={args=1, base=1}, undotree={}, -- cgit From 253f0ffd8d4784b7fca03f8f6c2455b9ee83ff9b Mon Sep 17 00:00:00 2001 From: Shougo Date: Mon, 29 Aug 2022 14:11:52 +0900 Subject: vim-patch:9.0.0285: it is not easy to change the command line from a plugin (#19979) vim-patch:9.0.0285: it is not easy to change the command line from a plugin Problem: It is not easy to change the command line from a plugin. Solution: Add setcmdline(). (Shougo Matsushita, closes vim/vim#10869) https://github.com/vim/vim/commit/07ea5f1509fe8dafe3262ed2702b4d0fc99e288b --- src/nvim/eval.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'src/nvim/eval.lua') diff --git a/src/nvim/eval.lua b/src/nvim/eval.lua index 4863d8013d..3e89489459 100644 --- a/src/nvim/eval.lua +++ b/src/nvim/eval.lua @@ -332,6 +332,7 @@ return { setcharpos={args=2, base=2}, setcharsearch={args=1, base=1}, setcmdpos={args=1, base=1}, + setcmdline={args={1, 2}, base=1}, setcursorcharpos={args={1, 3}, base=1}, setenv={args=2, base=2}, setfperm={args=2, base=1}, -- cgit From 245ac6f263b6017c050f885212ee80e5738d3b9f Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 12 Sep 2022 17:10:31 +0800 Subject: vim-patch:8.2.5034: there is no way to get the byte index from a virtual column Problem: There is no way to get the byte index from a virtual column. Solution: Add virtcol2col(). (Yegappan Lakshmanan, closes vim/vim#10477, closes vim/vim#10098) https://github.com/vim/vim/commit/5a6ec10cc80ab02eeff644ab19b82312630ea855 Cherry-pick tv_check_for_number_arg() from Vim. Cherry-pick pathshorten() doc change. --- src/nvim/eval.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'src/nvim/eval.lua') diff --git a/src/nvim/eval.lua b/src/nvim/eval.lua index 3e89489459..5c500af899 100644 --- a/src/nvim/eval.lua +++ b/src/nvim/eval.lua @@ -425,6 +425,7 @@ return { uniq={args={1, 3}, base=1}, values={args=1, base=1}, virtcol={args=1, base=1}, + virtcol2col={args=3, base=1}, visualmode={args={0, 1}}, wait={args={2,3}}, wildmenumode={}, -- cgit From 907fc8ac373226556b84c2fdc4fe26525bbdb2c4 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 13 Sep 2022 06:23:33 +0800 Subject: vim-patch:9.0.0449: there is no easy way to translate a key code into a string (#20168) Problem: There is no easy way to translate a string with a key code into a readable string. Solution: Add the keytrans() function. (closes vim/vim#11114) https://github.com/vim/vim/commit/cdc839353f68ca43db6446e1b727fc7ba657b738 vim-patch:7b2d87220c6c Add missing part of patch https://github.com/vim/vim/commit/7b2d87220c6c974d5cdae672b6f9620a6bcbd1dc --- src/nvim/eval.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'src/nvim/eval.lua') diff --git a/src/nvim/eval.lua b/src/nvim/eval.lua index 5c500af899..837fef23f4 100644 --- a/src/nvim/eval.lua +++ b/src/nvim/eval.lua @@ -236,6 +236,7 @@ return { json_decode={args=1, base=1}, json_encode={args=1, base=1}, keys={args=1, base=1}, + keytrans={args=1, base=1}, last_buffer_nr={}, -- obsolete len={args=1, base=1}, libcall={args=3, base=3}, -- cgit From 288208257c8d6b3c8dcce7ee6c7b6c7bb7bafb27 Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Sat, 8 Oct 2022 15:48:07 +0100 Subject: feat(cscope)!: remove --- src/nvim/eval.lua | 1 - 1 file changed, 1 deletion(-) (limited to 'src/nvim/eval.lua') diff --git a/src/nvim/eval.lua b/src/nvim/eval.lua index 837fef23f4..cc26bbf1a8 100644 --- a/src/nvim/eval.lua +++ b/src/nvim/eval.lua @@ -88,7 +88,6 @@ return { cos={args=1, base=1, float_func="cos"}, cosh={args=1, base=1, float_func="cosh"}, count={args={2, 4}, base=1}, - cscope_connection={args={0, 3}}, ctxget={args={0, 1}}, ctxpop={}, ctxpush={args={0, 1}}, -- cgit From 5568267ccb94924b9dcf7bfa5d52da0f16d161e4 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 27 Oct 2022 18:08:06 +0800 Subject: vim-patch:8.2.1544: cannot translate messages in a Vim script Problem: Cannot translate messages in a Vim script. Solution: Add gettext(). Try it out for a few messages in the options window. https://github.com/vim/vim/commit/0b39c3fd4c5d1c8ebd2efa85fced7df5e17efd3b Co-authored-by: Bram Moolenaar --- src/nvim/eval.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'src/nvim/eval.lua') diff --git a/src/nvim/eval.lua b/src/nvim/eval.lua index cc26bbf1a8..264659af1f 100644 --- a/src/nvim/eval.lua +++ b/src/nvim/eval.lua @@ -185,6 +185,7 @@ return { gettabvar={args={2, 3}, base=1}, gettabwinvar={args={3, 4}, base=1}, gettagstack={args={0, 1}, base=1}, + gettext={args=1, base=1}, getwininfo={args={0, 1}, base=1}, getwinpos={args={0, 1}, base=1}, getwinposx={}, -- cgit From c46d46e9f11a9960fcf9c498ecc72be4c416cfa5 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 1 Nov 2022 20:21:48 +0800 Subject: vim-patch:8.2.2343: Vim9: return type of readfile() is any (#20896) Problem: Vim9: return type of readfile() is any. Solution: Add readblob() so that readfile() can be expected to always return a list of strings. (closes vim/vim#7671) https://github.com/vim/vim/commit/c423ad77ed763c11ba67729bbf63c1cf0915231f Co-authored-by: Bram Moolenaar --- src/nvim/eval.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'src/nvim/eval.lua') diff --git a/src/nvim/eval.lua b/src/nvim/eval.lua index 264659af1f..ecb411a652 100644 --- a/src/nvim/eval.lua +++ b/src/nvim/eval.lua @@ -291,6 +291,7 @@ return { perleval={args=1, base=1}, rand={args={0, 1}, base=1}, range={args={1, 3}, base=1}, + readblob={args=1, base=1}, readdir={args={1, 2}, base=1}, readfile={args={1, 3}, base=1}, reduce={args={2, 3}, base=1}, -- cgit From 0d8293364f78237afb83d4822611d6fd8add66f8 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 5 Nov 2022 12:37:28 +0800 Subject: vim-patch:8.2.1479: Vim9: error for list index uses wrong line number Problem: Vim9: error for list index uses wrong line number. Solution: Set source line number. (closes vim/vim#6724) Add a way to assert the line number of the error with assert_fails(). https://github.com/vim/vim/commit/1d634542cf5ebcd1d5d83bd124b3e1d5e7c96c58 Co-authored-by: Bram Moolenaar --- src/nvim/eval.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/eval.lua') diff --git a/src/nvim/eval.lua b/src/nvim/eval.lua index ecb411a652..5952267c02 100644 --- a/src/nvim/eval.lua +++ b/src/nvim/eval.lua @@ -38,7 +38,7 @@ return { assert_equal={args={2, 3}, base=2}, assert_equalfile={args={2, 3}, base=1}, assert_exception={args={1, 2}}, - assert_fails={args={1, 3}, base=1}, + assert_fails={args={1, 4}, base=1}, assert_false={args={1, 2}, base=1}, assert_inrange={args={3, 4}, base=3}, assert_match={args={2, 3}, base=2}, -- cgit From 02f80d9a8a560a93142bcebf324ba14cde4dd1b5 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 5 Nov 2022 12:41:36 +0800 Subject: vim-patch:8.2.1631: test_fails() does not check the context of the line number Problem: test_fails() does not check the context of the line number. Solution: Use another argument to specify the context of the line number. https://github.com/vim/vim/commit/9bd5d879c2ecfbdbb168b090e12f4b89724a302e Co-authored-by: Bram Moolenaar --- src/nvim/eval.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/eval.lua') diff --git a/src/nvim/eval.lua b/src/nvim/eval.lua index 5952267c02..61e7f99afd 100644 --- a/src/nvim/eval.lua +++ b/src/nvim/eval.lua @@ -38,7 +38,7 @@ return { assert_equal={args={2, 3}, base=2}, assert_equalfile={args={2, 3}, base=1}, assert_exception={args={1, 2}}, - assert_fails={args={1, 4}, base=1}, + assert_fails={args={1, 5}, base=1}, assert_false={args={1, 2}, base=1}, assert_inrange={args={3, 4}, base=3}, assert_match={args={2, 3}, base=2}, -- cgit From 781616bee5e319fdfa034484c026222b50926ebf Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 5 Nov 2022 17:16:49 +0800 Subject: vim-patch:8.2.2606: strchars() defaults to counting composing characters Problem: strchars() defaults to counting composing characters. Solution: Add strcharlen() which ignores composing characters. https://github.com/vim/vim/commit/70ce8a1561c5396e4c4381f76a005cbb97646f80 Use docs from latest Vim instead. Co-authored-by: Bram Moolenaar --- src/nvim/eval.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'src/nvim/eval.lua') diff --git a/src/nvim/eval.lua b/src/nvim/eval.lua index 61e7f99afd..f47d258125 100644 --- a/src/nvim/eval.lua +++ b/src/nvim/eval.lua @@ -376,6 +376,7 @@ return { str2float={args=1, base=1}, str2list={args={1, 2}, base=1}, str2nr={args={1, 3}, base=1}, + strcharlen={args=1, base=1}, strcharpart={args={2, 3}, base=1}, strchars={args={1, 2}, base=1}, strdisplaywidth={args={1, 2}, base=1}, -- cgit From 8e868d699a9d0b68342d8d460a8f6dd9c075d7a8 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 22 Oct 2022 09:32:01 +0800 Subject: vim-patch:8.2.4679: cannot have expandcmd() give an error message for mistakes Problem: Cannot have expandcmd() give an error message for mistakes. Solution: Add an optional argument to give errors. Fix memory leak when expanding files fails. (Yegappan Lakshmanan, closes vim/vim#10071) https://github.com/vim/vim/commit/2b74b6805b5c8c4836b66df5d949f5ff6a77f8c7 Co-authored-by: Yegappan Lakshmanan --- src/nvim/eval.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/eval.lua') diff --git a/src/nvim/eval.lua b/src/nvim/eval.lua index f47d258125..8bfa6797d0 100644 --- a/src/nvim/eval.lua +++ b/src/nvim/eval.lua @@ -118,7 +118,7 @@ return { exists={args=1, base=1}, exp={args=1, base=1, float_func="exp"}, expand={args={1, 3}, base=1}, - expandcmd={args=1, base=1}, + expandcmd={args={1, 2}, base=1}, extend={args={2, 3}, base=1}, feedkeys={args={1, 2}, base=1}, file_readable={args=1, base=1, func='f_filereadable'}, -- obsolete -- cgit From 849394e4e26f487586761a3640475c27ceca30b9 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 13 Nov 2022 08:29:05 +0800 Subject: vim-patch:9.0.0863: col() and charcol() only work for the current window (#21038) Problem: col() and charcol() only work for the current window. Solution: Add an optional winid argument. (Yegappan Lakshmanan, closes vim/vim#11466, closes vim/vim#11461) https://github.com/vim/vim/commit/4c8d2f02b3ce037bbe1d5ee12887e343c6bde88f Cherry-pick test_functions.vim change from patch 8.2.0633. Co-authored-by: Yegappan Lakshmanan --- src/nvim/eval.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/nvim/eval.lua') diff --git a/src/nvim/eval.lua b/src/nvim/eval.lua index 8bfa6797d0..dd30f51eb4 100644 --- a/src/nvim/eval.lua +++ b/src/nvim/eval.lua @@ -73,12 +73,12 @@ return { chansend={args=2}, char2nr={args={1, 2}, base=1}, charclass={args=1, base=1}, - charcol={args=1, base=1}, + charcol={args={1, 2}, base=1}, charidx={args={2, 3}, base=1}, chdir={args=1, base=1}, cindent={args=1, base=1}, clearmatches={args={0, 1}, base=1}, - col={args=1, base=1}, + col={args={1, 2}, base=1}, complete={args=2, base=2}, complete_add={args=1, base=1}, complete_check={}, -- cgit From 9b768752353d3cf99c6cb02e6c1f9d70c029ecb6 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 22 Nov 2022 06:52:21 +0800 Subject: vim-patch:9.0.0916: getbufline() is inefficient for getting a single line Problem: getbufline() is inefficient for getting a single line. Solution: Add getbufoneline(). https://github.com/vim/vim/commit/ce30ccc06af7f2c03762e5b18dde37b26ea6ec42 Cherry-pick part of usr_41.txt from patch 8.1.1628. Co-authored-by: Bram Moolenaar --- src/nvim/eval.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'src/nvim/eval.lua') diff --git a/src/nvim/eval.lua b/src/nvim/eval.lua index dd30f51eb4..14be6aba73 100644 --- a/src/nvim/eval.lua +++ b/src/nvim/eval.lua @@ -146,6 +146,7 @@ return { get={args={2, 3}, base=1}, getbufinfo={args={0, 1}, base=1}, getbufline={args={2, 3}, base=1}, + getbufoneline={args=2, base=1}, getbufvar={args={2, 3}, base=1}, getchangelist={args={0, 1}, base=1}, getchar={args={0, 1}}, -- cgit From f4e03cbdbc88bd0c1095918df11450c98b729988 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 18 Jan 2023 06:50:22 +0800 Subject: vim-patch:9.0.1212: cannot read back what setcellwidths() has done (#21867) Problem: Cannot read back what setcellwidths() has done. Solution: Add getcellwidths(). (Kota Kato, closes vim/vim#11837) https://github.com/vim/vim/commit/66bb9ae70f7371456ed76518076d2a344f8ab417 Co-authored-by: Kota Kato --- src/nvim/eval.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'src/nvim/eval.lua') diff --git a/src/nvim/eval.lua b/src/nvim/eval.lua index 14be6aba73..c17a44b990 100644 --- a/src/nvim/eval.lua +++ b/src/nvim/eval.lua @@ -148,6 +148,7 @@ return { getbufline={args={2, 3}, base=1}, getbufoneline={args=2, base=1}, getbufvar={args={2, 3}, base=1}, + getcellwidths={}, getchangelist={args={0, 1}, base=1}, getchar={args={0, 1}}, getcharmod={}, -- cgit