diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-06-14 20:46:18 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-06-14 21:12:27 +0800 |
commit | 0a0cda95286bf62fbce2776a0c0081cea39a88a8 (patch) | |
tree | 03f43740a5822d058abf8822e9bfe8b561d460be /src/nvim/lua/executor.c | |
parent | 6130b4a84b41b71f4c0c58093a29585c6c67ff16 (diff) | |
download | rneovim-0a0cda95286bf62fbce2776a0c0081cea39a88a8.tar.gz rneovim-0a0cda95286bf62fbce2776a0c0081cea39a88a8.tar.bz2 rneovim-0a0cda95286bf62fbce2776a0c0081cea39a88a8.zip |
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
Diffstat (limited to 'src/nvim/lua/executor.c')
-rw-r--r-- | src/nvim/lua/executor.c | 4 |
1 files changed, 1 insertions, 3 deletions
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) { |