aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-12-27 17:14:31 -0500
committerGitHub <noreply@github.com>2020-12-27 17:14:31 -0500
commita58c5509d94f01f4a4edd6b4784f8d00b70af5b3 (patch)
treeb3cadc41e6fd4c747de5635dc0fb7556ec5e6e13 /src/nvim/eval
parentf2be59d8f80f2a1a68d5976b9cec3fa55da3700e (diff)
parentcff4cad25a1236bd869843f9578b7f276518d9b8 (diff)
downloadrneovim-a58c5509d94f01f4a4edd6b4784f8d00b70af5b3.tar.gz
rneovim-a58c5509d94f01f4a4edd6b4784f8d00b70af5b3.tar.bz2
rneovim-a58c5509d94f01f4a4edd6b4784f8d00b70af5b3.zip
Merge pull request #13607 from janlazo/vim-8.2.2221
vim-patch:8.1.2227,8.2.{315,928,1007,1052,1121,1580,2221,2229,2231,2232}
Diffstat (limited to 'src/nvim/eval')
-rw-r--r--src/nvim/eval/funcs.c4
-rw-r--r--src/nvim/eval/userfunc.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/eval/funcs.c b/src/nvim/eval/funcs.c
index ed01e8a8b0..16eb6f8898 100644
--- a/src/nvim/eval/funcs.c
+++ b/src/nvim/eval/funcs.c
@@ -6553,7 +6553,7 @@ static void f_readfile(typval_T *argvars, typval_T *rettv, FunPtr fptr)
}
if (prevlen == 0) {
assert(len < INT_MAX);
- s = vim_strnsave(start, (int)len);
+ s = vim_strnsave(start, len);
} else {
/* Change "prev" buffer to be the right size. This way
* the bytes are only copied once, and very long lines are
@@ -10855,7 +10855,7 @@ static void f_trim(typval_T *argvars, typval_T *rettv, FunPtr fptr)
}
}
}
- rettv->vval.v_string = vim_strnsave(head, (int)(tail - head));
+ rettv->vval.v_string = vim_strnsave(head, tail - head);
}
/*
diff --git a/src/nvim/eval/userfunc.c b/src/nvim/eval/userfunc.c
index 4e8b98d723..70c998ef39 100644
--- a/src/nvim/eval/userfunc.c
+++ b/src/nvim/eval/userfunc.c
@@ -2297,9 +2297,9 @@ void ex_function(exarg_T *eap)
// Ignore leading white space.
p = skipwhite(p + 4);
heredoc_trimmed =
- vim_strnsave(theline, (int)(skipwhite(theline) - theline));
+ vim_strnsave(theline, skipwhite(theline) - theline);
}
- skip_until = vim_strnsave(p, (int)(skiptowhite(p) - p));
+ skip_until = vim_strnsave(p, skiptowhite(p) - p);
do_concat = false;
is_heredoc = true;
}