aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-08-17 13:41:43 +0800
committerzeertzjq <zeertzjq@outlook.com>2023-08-17 15:20:47 +0800
commitc5576fcc8003280489c0aa0323a966e6de33e31f (patch)
tree85b5fb71ed9e7c5d28a0491e7ded93c63eecfb10 /src/nvim/eval.c
parent7f51829cf75e0d3ca546cab0e70a4c089eac40ec (diff)
downloadrneovim-c5576fcc8003280489c0aa0323a966e6de33e31f.tar.gz
rneovim-c5576fcc8003280489c0aa0323a966e6de33e31f.tar.bz2
rneovim-c5576fcc8003280489c0aa0323a966e6de33e31f.zip
vim-patch:8.2.3848: cannot use reduce() for a string
Problem: Cannot use reduce() for a string. Solution: Make reduce() work with a string. (Naruhiko Nishino, closes vim/vim#9366) https://github.com/vim/vim/commit/0ccb5842f5fb103763d106c7aa364d758343c35a Omit tv_get_first_char() as it doesn't really save much code. Co-authored-by: rbtnn <naru123456789@gmail.com>
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r--src/nvim/eval.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index dab0896d75..b73744f21b 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -108,7 +108,7 @@ static const char e_dot_can_only_be_used_on_dictionary_str[]
= N_("E1203: Dot can only be used on a dictionary: %s");
static const char e_empty_function_name[]
= N_("E1192: Empty function name");
-static char e_argument_of_str_must_be_list_string_dictionary_or_blob[]
+static const char e_argument_of_str_must_be_list_string_dictionary_or_blob[]
= N_("E1250: Argument of %s must be a List, String, Dictionary or Blob");
static char * const namespace_char = "abglstvw";
@@ -5206,7 +5206,6 @@ static void filter_map(typval_T *argvars, typval_T *rettv, filtermap_T filtermap
int len;
for (const char *p = tv_get_string(&argvars[0]); *p != NUL; p += len) {
len = utfc_ptr2len(p);
-
typval_T tv = {
.v_type = VAR_STRING,
.v_lock = VAR_UNLOCKED,