aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/lua/executor.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-09-01 18:46:34 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-09-02 22:28:57 +0800
commit1ef7720567b08caec0c077605fb2a01a9d6eafbc (patch)
tree5859afe514570e94c30c42ae5453729e172cf8ac /src/nvim/lua/executor.c
parent2afcdbd63a5b0cbeaad9d83b096a3af5201c67a9 (diff)
downloadrneovim-1ef7720567b08caec0c077605fb2a01a9d6eafbc.tar.gz
rneovim-1ef7720567b08caec0c077605fb2a01a9d6eafbc.tar.bz2
rneovim-1ef7720567b08caec0c077605fb2a01a9d6eafbc.zip
fix(api)!: correctly deal with number before :tab
Now nvim_parse_cmd and nvim_create_user_command use a "tab" value which is the same as the number passed before :tab modifier instead of the number plus 1, and "tab" value is -1 if :tab modifier is not used.
Diffstat (limited to 'src/nvim/lua/executor.c')
-rw-r--r--src/nvim/lua/executor.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/lua/executor.c b/src/nvim/lua/executor.c
index 2315ecd874..1013cf76f9 100644
--- a/src/nvim/lua/executor.c
+++ b/src/nvim/lua/executor.c
@@ -2082,7 +2082,7 @@ int nlua_do_ucmd(ucmd_T *cmd, exarg_T *eap, bool preview)
lua_newtable(lstate); // smods table
- lua_pushinteger(lstate, cmdmod.cmod_tab);
+ lua_pushinteger(lstate, cmdmod.cmod_tab - 1);
lua_setfield(lstate, -2, "tab");
lua_pushinteger(lstate, cmdmod.cmod_verbose - 1);