From 0a0cda95286bf62fbce2776a0c0081cea39a88a8 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 14 Jun 2022 20:46:18 +0800 Subject: vim-patch:8.2.5088: value of cmod_verbose is a bit complicated to use Problem: Value of cmod_verbose is a bit complicated to use. Solution: Use zero for not set, value + 1 when set. (closes vim/vim#10564) https://github.com/vim/vim/commit/cd7496382efc9e6748326c6cda7f01003fa07063 Omit has_cmdmod(): only used for Vim9 script --- src/nvim/lua/executor.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/nvim/lua/executor.c') diff --git a/src/nvim/lua/executor.c b/src/nvim/lua/executor.c index 5bc06bf3fe..b0054be613 100644 --- a/src/nvim/lua/executor.c +++ b/src/nvim/lua/executor.c @@ -1920,9 +1920,7 @@ int nlua_do_ucmd(ucmd_T *cmd, exarg_T *eap, bool preview) lua_pushinteger(lstate, cmdmod.cmod_tab); lua_setfield(lstate, -2, "tab"); - lua_pushinteger(lstate, (cmdmod.cmod_verbose != 0 - ? cmdmod.cmod_verbose < 0 ? 0 : cmdmod.cmod_verbose - : -1)); + lua_pushinteger(lstate, cmdmod.cmod_verbose - 1); lua_setfield(lstate, -2, "verbose"); if (cmdmod.cmod_split & WSP_ABOVE) { -- cgit