aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/usercmd.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-08-14 05:18:21 +0800
committerGitHub <noreply@github.com>2022-08-14 05:18:21 +0800
commit8cd116729fe2a15d62cd10e5ba7d3dcf1f677337 (patch)
treec3697b80da96e6e1165742979deb121ca491b1d0 /src/nvim/usercmd.c
parentc1cbe3fb3d2ec1dbcfdc14ee2d9a5e8049d494ae (diff)
parent1ca2247639424994890ef70ab34f2bffa23ddd9f (diff)
downloadrneovim-8cd116729fe2a15d62cd10e5ba7d3dcf1f677337.tar.gz
rneovim-8cd116729fe2a15d62cd10e5ba7d3dcf1f677337.tar.bz2
rneovim-8cd116729fe2a15d62cd10e5ba7d3dcf1f677337.zip
Merge pull request #19752 from zeertzjq/vim-8.2.0056
vim-patch:8.2.{0056,0061,0078,0097,0823}: execution stack
Diffstat (limited to 'src/nvim/usercmd.c')
-rw-r--r--src/nvim/usercmd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/usercmd.c b/src/nvim/usercmd.c
index bf5faf7bc9..59b8d10200 100644
--- a/src/nvim/usercmd.c
+++ b/src/nvim/usercmd.c
@@ -17,6 +17,7 @@
#include "nvim/garray.h"
#include "nvim/lua/executor.h"
#include "nvim/os/input.h"
+#include "nvim/runtime.h"
#include "nvim/usercmd.h"
#include "nvim/window.h"
@@ -168,7 +169,7 @@ char *find_ucmd(exarg_T *eap, char *p, int *full, expand_T *xp, int *complp)
xp->xp_luaref = uc->uc_compl_luaref;
xp->xp_arg = (char *)uc->uc_compl_arg;
xp->xp_script_ctx = uc->uc_script_ctx;
- xp->xp_script_ctx.sc_lnum += sourcing_lnum;
+ xp->xp_script_ctx.sc_lnum += SOURCING_LNUM;
}
// Do not search for further abbreviations
// if this is an exact match.
@@ -890,7 +891,7 @@ int uc_add_command(char *name, size_t name_len, const char *rep, uint32_t argt,
cmd->uc_def = def;
cmd->uc_compl = compl;
cmd->uc_script_ctx = current_sctx;
- cmd->uc_script_ctx.sc_lnum += sourcing_lnum;
+ cmd->uc_script_ctx.sc_lnum += SOURCING_LNUM;
nlua_set_sctx(&cmd->uc_script_ctx);
cmd->uc_compl_arg = (char_u *)compl_arg;
cmd->uc_compl_luaref = compl_luaref;