comparison src/sign.c @ 30015:adb0de8be4ce v9.0.0345

patch 9.0.0345: error message for list argument could be clearer Commit: https://github.com/vim/vim/commit/d83392a43a48c566c0f3b76382a3648584dae32b Author: Bram Moolenaar <Bram@vim.org> Date: Thu Sep 1 12:22:46 2022 +0100 patch 9.0.0345: error message for list argument could be clearer Problem: Error message for list argument could be clearer. Solution: Include the argument number. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/11027)
author Bram Moolenaar <Bram@vim.org>
date Thu, 01 Sep 2022 13:30:05 +0200
parents 86eb4aba16c3
children fd855ad74887
comparison
equal deleted inserted replaced
30014:3fb163e2ef6c 30015:adb0de8be4ce
2658 return; 2658 return;
2659 2659
2660 if (in_vim9script() && check_for_list_arg(argvars, 0) == FAIL) 2660 if (in_vim9script() && check_for_list_arg(argvars, 0) == FAIL)
2661 return; 2661 return;
2662 2662
2663 if (argvars[0].v_type != VAR_LIST) 2663 if (check_for_list_arg(argvars, 0) == FAIL)
2664 { 2664 return;
2665 emsg(_(e_list_required));
2666 return;
2667 }
2668 2665
2669 // Process the List of sign attributes 2666 // Process the List of sign attributes
2670 FOR_ALL_LIST_ITEMS(argvars[0].vval.v_list, li) 2667 FOR_ALL_LIST_ITEMS(argvars[0].vval.v_list, li)
2671 { 2668 {
2672 sign_id = -1; 2669 sign_id = -1;
2886 return; 2883 return;
2887 2884
2888 if (in_vim9script() && check_for_list_arg(argvars, 0) == FAIL) 2885 if (in_vim9script() && check_for_list_arg(argvars, 0) == FAIL)
2889 return; 2886 return;
2890 2887
2891 if (argvars[0].v_type != VAR_LIST) 2888 if (check_for_list_arg(argvars, 0) == FAIL)
2892 { 2889 return;
2893 emsg(_(e_list_required));
2894 return;
2895 }
2896 2890
2897 FOR_ALL_LIST_ITEMS(argvars[0].vval.v_list, li) 2891 FOR_ALL_LIST_ITEMS(argvars[0].vval.v_list, li)
2898 { 2892 {
2899 retval = -1; 2893 retval = -1;
2900 if (li->li_tv.v_type == VAR_DICT) 2894 if (li->li_tv.v_type == VAR_DICT)