From a92b38934a2d00c13ee4d1969d994da15e0857ab Mon Sep 17 00:00:00 2001 From: bfredl Date: Mon, 20 Mar 2023 21:11:10 +0100 Subject: feat(lua): allow `:=expr` as a shorter version of `:lua =expr` existing behavior of := and :[range]= are unchanged. `|` is still allowed with this usage. However, :=p and similar are changed in a way which could be construed as a breaking change. Allowing |ex-flags| for := in the first place was a mistake as any form of := DOES NOT MOVE THE CURSOR. So it would print one line number and then print a completely different line contents after that. --- src/nvim/ex_cmds.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/ex_cmds.lua') diff --git a/src/nvim/ex_cmds.lua b/src/nvim/ex_cmds.lua index c8b6ceab69..2fd50a18d3 100644 --- a/src/nvim/ex_cmds.lua +++ b/src/nvim/ex_cmds.lua @@ -3319,7 +3319,7 @@ module.cmds = { { command='=', enum='CMD_equal', - flags=bit.bor(RANGE, TRLBAR, DFLALL, FLAGS, CMDWIN, LOCK_OK), + flags=bit.bor(RANGE, EXTRA, DFLALL, ARGOPT, CMDWIN, LOCK_OK), addr_type='ADDR_LINES', func='ex_equal', }, -- cgit From e4a136f713753e6ace97f419be562567f1ce535f Mon Sep 17 00:00:00 2001 From: bfredl Date: Wed, 12 Apr 2023 22:22:37 +0200 Subject: feat(ex_cmds)!: remove :behave just use the individual options instead. set selection=exclusive set selectmode=mouse,key set mousemodel=popup set keymodel=startsel,stopsel --- src/nvim/ex_cmds.lua | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src/nvim/ex_cmds.lua') diff --git a/src/nvim/ex_cmds.lua b/src/nvim/ex_cmds.lua index 2fd50a18d3..bdc1174de3 100644 --- a/src/nvim/ex_cmds.lua +++ b/src/nvim/ex_cmds.lua @@ -196,12 +196,6 @@ module.cmds = { addr_type='ADDR_BUFFERS', func='ex_bunload', }, - { - command='behave', - flags=bit.bor(BANG, NEEDARG, WORD1, TRLBAR, CMDWIN, LOCK_OK), - addr_type='ADDR_NONE', - func='ex_behave', - }, { command='belowright', flags=bit.bor(NEEDARG, EXTRA, NOTRLCOM), -- cgit From 8f69c5ed450337b9f77c50f9ee0d3eb32f649ca6 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 14 Apr 2023 07:11:59 +0800 Subject: vim-patch:8.2.{0695,0725,0734,0753,0818,0819,0822} (#23075) vim-patch:8.2.0695: Vim9: cannot define a function inside a function Problem: Vim9: cannot define a function inside a function. Solution: Initial support for :def inside :def. https://github.com/vim/vim/commit/04b12697838b232b8b17c553ccc74cf1f1bdb81c vim-patch:8.2.0725: Vim9: cannot call a function declared later in Vim9 script Problem: Vim9: cannot call a function declared later in Vim9 script. Solution: Make two passes through the script file. https://github.com/vim/vim/commit/09689a02840be40fa7bb10b1921fb5bc5b2908f1 vim-patch:8.2.0734: Vim9: leaking memory when using :finish Problem: Vim9: leaking memory when using :finish. Solution: Do not check for next line in third pass. https://github.com/vim/vim/commit/04816717dfea6e2469ff4c9d40f68b59aaf03724 vim-patch:8.2.0753: Vim9: expressions are evaluated in the discovery phase Problem: Vim9: expressions are evaluated in the discovery phase. Solution: Bail out if an expression is not a constant. Require a type for declared constants. https://github.com/vim/vim/commit/32e351179eacfc84f64cd5029e221582d400bb38 vim-patch:8.2.0818: Vim9: using a discovery phase doesn't work well Problem: Vim9: using a discovery phase doesn't work well. Solution: Remove the discovery phase, instead compile a function only when it is used. Add :defcompile to compile def functions earlier. https://github.com/vim/vim/commit/822ba24743af9ee1b5e7f656a7a61a38f3638bca vim-patch:8.2.0819: compiler warning for unused variable Problem: Compiler warning for unused variable. Solution: Remove the variable. https://github.com/vim/vim/commit/f40e51a880a95f94dbbbecc9476559506c2cc345 vim-patch:8.2.0822: Vim9: code left over from discovery phase Problem: Vim9: code left over from discovery phase. Solution: Remove the dead code. https://github.com/vim/vim/commit/2eec37926db6d31beb36f162ac00357a30c093c8 Co-authored-by: Bram Moolenaar --- src/nvim/ex_cmds.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/ex_cmds.lua') diff --git a/src/nvim/ex_cmds.lua b/src/nvim/ex_cmds.lua index bdc1174de3..be6299db0e 100644 --- a/src/nvim/ex_cmds.lua +++ b/src/nvim/ex_cmds.lua @@ -634,7 +634,7 @@ module.cmds = { command='const', flags=bit.bor(EXTRA, NOTRLCOM, SBOXOK, CMDWIN, LOCK_OK), addr_type='ADDR_NONE', - func='ex_const', + func='ex_let', }, { command='copen', -- cgit From b75634e55ee4cdfee7917b29f39e3ca1307cb059 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 16 Apr 2023 07:50:18 +0800 Subject: vim-patch:9.0.0370: cleaning up afterwards can make a function messy Problem: Cleaning up afterwards can make a function messy. Solution: Add the :defer command. https://github.com/vim/vim/commit/1d84f7608f1e41dad03b8cc7925895437775f7c0 Omit EX_EXPR_ARG: Vim9 script only. Make :def throw E319 to avoid confusing behavior. Co-authored-by: Bram Moolenaar --- src/nvim/ex_cmds.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/nvim/ex_cmds.lua') diff --git a/src/nvim/ex_cmds.lua b/src/nvim/ex_cmds.lua index be6299db0e..845ea4bb15 100644 --- a/src/nvim/ex_cmds.lua +++ b/src/nvim/ex_cmds.lua @@ -714,6 +714,18 @@ module.cmds = { addr_type='ADDR_OTHER', func='ex_debuggreedy', }, + { + command='def', + flags=bit.bor(EXTRA, BANG, SBOXOK, CMDWIN, LOCK_OK), + addr_type='ADDR_NONE', + func='ex_ni', + }, + { + command='defer', + flags=bit.bor(NEEDARG, EXTRA, NOTRLCOM, CMDWIN, LOCK_OK), + addr_type='ADDR_NONE', + func='ex_call', + }, { command='delcommand', flags=bit.bor(BANG, NEEDARG, WORD1, TRLBAR, CMDWIN, LOCK_OK), -- cgit From 75d9c413d49261b8f9a96f45edda0af9f0e8d947 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 17 Apr 2023 17:44:08 +0800 Subject: fix(excmd): make :def unknown rather than unimplemented (#23150) --- src/nvim/ex_cmds.lua | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/nvim/ex_cmds.lua') diff --git a/src/nvim/ex_cmds.lua b/src/nvim/ex_cmds.lua index 845ea4bb15..b0938fa711 100644 --- a/src/nvim/ex_cmds.lua +++ b/src/nvim/ex_cmds.lua @@ -714,15 +714,9 @@ module.cmds = { addr_type='ADDR_OTHER', func='ex_debuggreedy', }, - { - command='def', - flags=bit.bor(EXTRA, BANG, SBOXOK, CMDWIN, LOCK_OK), - addr_type='ADDR_NONE', - func='ex_ni', - }, { command='defer', - flags=bit.bor(NEEDARG, EXTRA, NOTRLCOM, CMDWIN, LOCK_OK), + flags=bit.bor(NEEDARG, EXTRA, NOTRLCOM, SBOXOK, CMDWIN, LOCK_OK), addr_type='ADDR_NONE', func='ex_call', }, -- cgit From 78010910625aab8ef41658f35fc1fa68162f6852 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 1 Jun 2023 20:28:16 +0800 Subject: vim-patch:9.0.1596: :registers command does not work in sandbox (#23866) Problem: :registers command does not work in sandbox. Solution: Add flag to the command. (closes vim/vim#12473) https://github.com/vim/vim/commit/eb43b7f0531bd13d15580b5c262a25d6a52a0823 Co-authored-by: Julio B --- src/nvim/ex_cmds.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/ex_cmds.lua') diff --git a/src/nvim/ex_cmds.lua b/src/nvim/ex_cmds.lua index b0938fa711..88f3bc0b43 100644 --- a/src/nvim/ex_cmds.lua +++ b/src/nvim/ex_cmds.lua @@ -2212,7 +2212,7 @@ module.cmds = { }, { command='registers', - flags=bit.bor(EXTRA, NOTRLCOM, TRLBAR, CMDWIN, LOCK_OK), + flags=bit.bor(EXTRA, NOTRLCOM, TRLBAR, SBOXOK, CMDWIN, LOCK_OK), addr_type='ADDR_NONE', func='ex_display', }, -- cgit From 372aa2eb3db375385cf19dc0a6571f790b858241 Mon Sep 17 00:00:00 2001 From: glepnir Date: Mon, 9 Oct 2023 18:47:10 +0800 Subject: feat(float): add fclose command --- src/nvim/ex_cmds.lua | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/nvim/ex_cmds.lua') diff --git a/src/nvim/ex_cmds.lua b/src/nvim/ex_cmds.lua index 88f3bc0b43..27f8535a1c 100644 --- a/src/nvim/ex_cmds.lua +++ b/src/nvim/ex_cmds.lua @@ -1044,6 +1044,12 @@ module.cmds = { addr_type='ADDR_NONE', func='ex_function', }, + { + command='fclose', + flags=bit.bor(BANG, RANGE), + addr_type='ADDR_OTHER', + func='ex_floatclose', + }, { command='global', flags=bit.bor(RANGE, WHOLEFOLD, BANG, EXTRA, DFLALL, SBOXOK, CMDWIN, LOCK_OK), -- cgit From f79052faef874b19ebbed007c30eb3f2c994a8b2 Mon Sep 17 00:00:00 2001 From: Raphael Date: Wed, 11 Oct 2023 15:03:59 +0800 Subject: refactor(float): rename ex_floatclose to ex_fclose (#25596) --- src/nvim/ex_cmds.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/ex_cmds.lua') diff --git a/src/nvim/ex_cmds.lua b/src/nvim/ex_cmds.lua index 27f8535a1c..4859a70553 100644 --- a/src/nvim/ex_cmds.lua +++ b/src/nvim/ex_cmds.lua @@ -1048,7 +1048,7 @@ module.cmds = { command='fclose', flags=bit.bor(BANG, RANGE), addr_type='ADDR_OTHER', - func='ex_floatclose', + func='ex_fclose', }, { command='global', -- cgit