Mercurial > vim
comparison src/usercmd.c @ 18991:847cc7932c42 v8.2.0056
patch 8.2.0056: execution stack is incomplete and inefficient
Commit: https://github.com/vim/vim/commit/1a47ae32cdc19b0fd5a82e19fe5fddf45db1a506
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Dec 29 23:04:25 2019 +0100
patch 8.2.0056: execution stack is incomplete and inefficient
Problem: Execution stack is incomplete and inefficient.
Solution: Introduce a proper execution stack and use it instead of
sourcing_name/sourcing_lnum. Create a string only when used.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 29 Dec 2019 23:15:04 +0100 |
parents | e378907d79bf |
children | d13f8ae3b1de |
comparison
equal
deleted
inserted
replaced
18990:1219ae40b086 | 18991:847cc7932c42 |
---|---|
189 # ifdef FEAT_EVAL | 189 # ifdef FEAT_EVAL |
190 if (xp != NULL) | 190 if (xp != NULL) |
191 { | 191 { |
192 xp->xp_arg = uc->uc_compl_arg; | 192 xp->xp_arg = uc->uc_compl_arg; |
193 xp->xp_script_ctx = uc->uc_script_ctx; | 193 xp->xp_script_ctx = uc->uc_script_ctx; |
194 xp->xp_script_ctx.sc_lnum += sourcing_lnum; | 194 xp->xp_script_ctx.sc_lnum += SOURCING_LNUM; |
195 } | 195 } |
196 # endif | 196 # endif |
197 // Do not search for further abbreviations | 197 // Do not search for further abbreviations |
198 // if this is an exact match. | 198 // if this is an exact match. |
199 matchlen = k; | 199 matchlen = k; |
954 cmd->uc_argt = argt; | 954 cmd->uc_argt = argt; |
955 cmd->uc_def = def; | 955 cmd->uc_def = def; |
956 cmd->uc_compl = compl; | 956 cmd->uc_compl = compl; |
957 #ifdef FEAT_EVAL | 957 #ifdef FEAT_EVAL |
958 cmd->uc_script_ctx = current_sctx; | 958 cmd->uc_script_ctx = current_sctx; |
959 cmd->uc_script_ctx.sc_lnum += sourcing_lnum; | 959 cmd->uc_script_ctx.sc_lnum += SOURCING_LNUM; |
960 cmd->uc_compl_arg = compl_arg; | 960 cmd->uc_compl_arg = compl_arg; |
961 #endif | 961 #endif |
962 cmd->uc_addr_type = addr_type; | 962 cmd->uc_addr_type = addr_type; |
963 | 963 |
964 return OK; | 964 return OK; |