aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-04-16 10:59:59 +0800
committerzeertzjq <zeertzjq@outlook.com>2023-04-16 15:04:41 +0800
commitb1a341a48a59bf489ffe492d69cfaeb94b87fd78 (patch)
treec446e5d4c8e455962cf7600b5e9bed103d511491
parentf39b33ee491a4a8d4b08425e582dd0dd53617edf (diff)
downloadrneovim-b1a341a48a59bf489ffe492d69cfaeb94b87fd78.tar.gz
rneovim-b1a341a48a59bf489ffe492d69cfaeb94b87fd78.tar.bz2
rneovim-b1a341a48a59bf489ffe492d69cfaeb94b87fd78.zip
vim-patch:9.0.1446: unnecessary checks for the "skip" flag when skipping
Problem: Unnecessary checks for the "skip" flag when skipping. Solution: Remove the unnecessary checks. (closes vim/vim#12254) https://github.com/vim/vim/commit/5299c0933f942c61bfd48064c91365e518fa868c
-rw-r--r--src/nvim/eval/userfunc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/eval/userfunc.c b/src/nvim/eval/userfunc.c
index 808fb316fe..f91962ac09 100644
--- a/src/nvim/eval/userfunc.c
+++ b/src/nvim/eval/userfunc.c
@@ -3063,6 +3063,7 @@ void ex_return(exarg_T *eap)
clear_evalarg(&evalarg, eap);
}
+/// Lower level implementation of "call". Only called when not skipping.
static int ex_call_inner(exarg_T *eap, char *name, char **arg, char *startarg,
const funcexe_T *const funcexe_init, evalarg_T *const evalarg)
{
@@ -3070,7 +3071,7 @@ static int ex_call_inner(exarg_T *eap, char *name, char **arg, char *startarg,
bool failed = false;
for (linenr_T lnum = eap->line1; lnum <= eap->line2; lnum++) {
- if (eap->addr_count > 0) { // -V560
+ if (eap->addr_count > 0) {
if (lnum > curbuf->b_ml.ml_line_count) {
// If the function deleted lines or switched to another buffer
// the line number may become invalid.