comparison src/search.c @ 26865:bce848ec8b1b v8.2.3961

patch 8.2.3961: error messages are spread out Commit: https://github.com/vim/vim/commit/436b5adc9770a2568209dd5ab1f98bd1afc91898 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Dec 31 22:49:24 2021 +0000 patch 8.2.3961: error messages are spread out Problem: Error messages are spread out. Solution: Move more errors to errors.h.
author Bram Moolenaar <Bram@vim.org>
date Sat, 01 Jan 2022 00:00:04 +0100
parents 0d798c7e1865
children 06a137af96f8
comparison
equal deleted inserted replaced
26864:eb95ad159bce 26865:bce848ec8b1b
1118 vim_regfree(regmatch.regprog); 1118 vim_regfree(regmatch.regprog);
1119 1119
1120 if (!found) // did not find it 1120 if (!found) // did not find it
1121 { 1121 {
1122 if (got_int) 1122 if (got_int)
1123 emsg(_(e_interr)); 1123 emsg(_(e_interrupted));
1124 else if ((options & SEARCH_MSG) == SEARCH_MSG) 1124 else if ((options & SEARCH_MSG) == SEARCH_MSG)
1125 { 1125 {
1126 if (p_ws) 1126 if (p_ws)
1127 semsg(_(e_patnotf2), mr_pattern); 1127 semsg(_(e_patnotf2), mr_pattern);
1128 else if (lnum == 0) 1128 else if (lnum == 0)
3988 } 3988 }
3989 } 3989 }
3990 else if (!found && action != ACTION_EXPAND) 3990 else if (!found && action != ACTION_EXPAND)
3991 { 3991 {
3992 if (got_int || ins_compl_interrupted()) 3992 if (got_int || ins_compl_interrupted())
3993 emsg(_(e_interr)); 3993 emsg(_(e_interrupted));
3994 else if (type == FIND_DEFINE) 3994 else if (type == FIND_DEFINE)
3995 emsg(_("E388: Couldn't find definition")); 3995 emsg(_("E388: Couldn't find definition"));
3996 else 3996 else
3997 emsg(_("E389: Couldn't find pattern")); 3997 emsg(_("E389: Couldn't find pattern"));
3998 } 3998 }
4150 di = dict_find(dict, (char_u *)"pos", -1); 4150 di = dict_find(dict, (char_u *)"pos", -1);
4151 if (di != NULL) 4151 if (di != NULL)
4152 { 4152 {
4153 if (di->di_tv.v_type != VAR_LIST) 4153 if (di->di_tv.v_type != VAR_LIST)
4154 { 4154 {
4155 semsg(_(e_invarg2), "pos"); 4155 semsg(_(e_invalid_argument_str), "pos");
4156 return; 4156 return;
4157 } 4157 }
4158 if (list_len(di->di_tv.vval.v_list) != 3) 4158 if (list_len(di->di_tv.vval.v_list) != 3)
4159 { 4159 {
4160 semsg(_(e_invarg2), "List format should be [lnum, col, off]"); 4160 semsg(_(e_invalid_argument_str), "List format should be [lnum, col, off]");
4161 return; 4161 return;
4162 } 4162 }
4163 li = list_find(di->di_tv.vval.v_list, 0L); 4163 li = list_find(di->di_tv.vval.v_list, 0L);
4164 if (li != NULL) 4164 if (li != NULL)
4165 { 4165 {
4811 return; 4811 return;
4812 } 4812 }
4813 if (argvars[1].v_type != VAR_STRING 4813 if (argvars[1].v_type != VAR_STRING
4814 || argvars[1].vval.v_string == NULL) 4814 || argvars[1].vval.v_string == NULL)
4815 { 4815 {
4816 semsg(_(e_invarg2), tv_get_string(&argvars[1])); 4816 semsg(_(e_invalid_argument_str), tv_get_string(&argvars[1]));
4817 return; 4817 return;
4818 } 4818 }
4819 4819
4820 if (argvars[2].v_type != VAR_UNKNOWN) 4820 if (argvars[2].v_type != VAR_UNKNOWN)
4821 { 4821 {
4835 { 4835 {
4836 if (di->di_tv.v_type != VAR_STRING 4836 if (di->di_tv.v_type != VAR_STRING
4837 || di->di_tv.vval.v_string == NULL 4837 || di->di_tv.vval.v_string == NULL
4838 || *di->di_tv.vval.v_string == NUL) 4838 || *di->di_tv.vval.v_string == NUL)
4839 { 4839 {
4840 semsg(_(e_invarg2), tv_get_string(&di->di_tv)); 4840 semsg(_(e_invalid_argument_str), tv_get_string(&di->di_tv));
4841 return; 4841 return;
4842 } 4842 }
4843 key = tv_get_string(&di->di_tv); 4843 key = tv_get_string(&di->di_tv);
4844 } 4844 }
4845 else if ((di = dict_find(d, (char_u *)"text_cb", -1)) != NULL) 4845 else if ((di = dict_find(d, (char_u *)"text_cb", -1)) != NULL)
4846 { 4846 {
4847 cb = get_callback(&di->di_tv); 4847 cb = get_callback(&di->di_tv);
4848 if (cb.cb_name == NULL) 4848 if (cb.cb_name == NULL)
4849 { 4849 {
4850 semsg(_(e_invargval), "text_cb"); 4850 semsg(_(e_invalid_value_for_argument_str), "text_cb");
4851 return; 4851 return;
4852 } 4852 }
4853 } 4853 }
4854 if (dict_find(d, (char_u *)"matchseq", -1) != NULL) 4854 if (dict_find(d, (char_u *)"matchseq", -1) != NULL)
4855 matchseq = TRUE; 4855 matchseq = TRUE;