Mercurial > vim
diff src/list.c @ 23917:4b417b776b95 v8.2.2501
patch 8.2.2501: not always clear where an error is reported
Commit: https://github.com/vim/vim/commit/f785aa1354208f6b644e891aa01f8f86d947af7e
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Feb 11 21:19:34 2021 +0100
patch 8.2.2501: not always clear where an error is reported
Problem: Not always clear where an error is reported.
Solution: Add the where_T structure and pass it around. (closes https://github.com/vim/vim/issues/7796)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 11 Feb 2021 21:30:04 +0100 |
parents | d95403445b6b |
children | 9fcd71d0db89 |
line wrap: on
line diff
--- a/src/list.c +++ b/src/list.c @@ -698,7 +698,7 @@ list_insert_tv(list_T *l, typval_T *tv, listitem_T *ni; if (l->lv_type != NULL && l->lv_type->tt_member != NULL - && check_typval_type(l->lv_type->tt_member, tv, 0) == FAIL) + && check_typval_arg_type(l->lv_type->tt_member, tv, 0) == FAIL) return FAIL; ni = listitem_alloc(); if (ni == NULL) @@ -2135,8 +2135,8 @@ filter_map(typval_T *argvars, typval_T * } if (filtermap == FILTERMAP_MAP) { - if (type != NULL && check_typval_type(type->tt_member, - &newtv, 0) == FAIL) + if (type != NULL && check_typval_arg_type( + type->tt_member, &newtv, 0) == FAIL) { clear_tv(&newtv); break; @@ -2270,8 +2270,8 @@ filter_map(typval_T *argvars, typval_T * if (filtermap != FILTERMAP_FILTER) { if (filtermap == FILTERMAP_MAP && type != NULL - && check_typval_type(type->tt_member, - &newtv, 0) == FAIL) + && check_typval_arg_type( + type->tt_member, &newtv, 0) == FAIL) { clear_tv(&newtv); break; @@ -2314,8 +2314,8 @@ filter_map(typval_T *argvars, typval_T * } if (filtermap == FILTERMAP_MAP) { - if (type != NULL && check_typval_type(type->tt_member, - &newtv, 0) == FAIL) + if (type != NULL && check_typval_arg_type( + type->tt_member, &newtv, 0) == FAIL) { clear_tv(&newtv); break; @@ -2584,7 +2584,8 @@ extend(typval_T *argvars, typval_T *rett } else item = NULL; - if (type != NULL && check_typval_type(type, &argvars[1], 2) == FAIL) + if (type != NULL && check_typval_arg_type( + type, &argvars[1], 2) == FAIL) goto theend; list_extend(l1, l2, item); @@ -2641,7 +2642,8 @@ extend(typval_T *argvars, typval_T *rett else action = (char_u *)"force"; - if (type != NULL && check_typval_type(type, &argvars[1], 2) == FAIL) + if (type != NULL && check_typval_arg_type( + type, &argvars[1], 2) == FAIL) goto theend; dict_extend(d1, d2, action);