aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/vim.c
diff options
context:
space:
mode:
authorJavier Lopez <graulopezjavier@gmail.com>2022-02-27 14:35:06 -0500
committerGitHub <noreply@github.com>2022-02-27 12:35:06 -0700
commit1b5767aa3480c0cdc43f7a4b78f36a14e85a182f (patch)
tree2329eff263bf6893de4108ab6890515e5f1c3970 /src/nvim/api/vim.c
parentc65d93e60adcacded822f0ad5d539042e600f523 (diff)
downloadrneovim-1b5767aa3480c0cdc43f7a4b78f36a14e85a182f.tar.gz
rneovim-1b5767aa3480c0cdc43f7a4b78f36a14e85a182f.tar.bz2
rneovim-1b5767aa3480c0cdc43f7a4b78f36a14e85a182f.zip
feat(lua): add <f-args> to user commands callback (#17522)
Works similar to ex <f-args>. It only splits the arguments if the command has more than one posible argument. In cases were the command can only have 1 argument opts.fargs = { opts.args }
Diffstat (limited to 'src/nvim/api/vim.c')
-rw-r--r--src/nvim/api/vim.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/api/vim.c b/src/nvim/api/vim.c
index cd9d61ed24..302dccbde7 100644
--- a/src/nvim/api/vim.c
+++ b/src/nvim/api/vim.c
@@ -2415,6 +2415,8 @@ Dictionary nvim_eval_statusline(String str, Dict(eval_statusline) *opts, Error *
/// from Lua, the command can also be a Lua function. The function is called with a
/// single table argument that contains the following keys:
/// - args: (string) The args passed to the command, if any |<args>|
+/// - fargs: (table) The args split by unescaped whitespace (when more than one
+/// argument is allowed), if any |<f-args>|
/// - bang: (boolean) "true" if the command was executed with a ! modifier |<bang>|
/// - line1: (number) The starting line of the command range |<line1>|
/// - line2: (number) The final line of the command range |<line2>|