Mercurial > vim
comparison src/quickfix.c @ 26877:06a137af96f8 v8.2.3967
patch 8.2.3967: error messages are spread out
Commit: https://github.com/vim/vim/commit/460ae5dfca31fa627531c263184849976755cf6b
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jan 1 14:19:49 2022 +0000
patch 8.2.3967: 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 15:30:05 +0100 |
parents | bce848ec8b1b |
children | 7f150a4936f2 |
comparison
equal
deleted
inserted
replaced
26876:601a973ac16c | 26877:06a137af96f8 |
---|---|
2200 { | 2200 { |
2201 qi = GET_LOC_LIST(curwin); | 2201 qi = GET_LOC_LIST(curwin); |
2202 if (qi == NULL) | 2202 if (qi == NULL) |
2203 { | 2203 { |
2204 if (print_emsg) | 2204 if (print_emsg) |
2205 emsg(_(e_loclist)); | 2205 emsg(_(e_no_location_list)); |
2206 return NULL; | 2206 return NULL; |
2207 } | 2207 } |
2208 } | 2208 } |
2209 | 2209 |
2210 return qi; | 2210 return qi; |
3817 | 3817 |
3818 if (eap->addr_count > 0) | 3818 if (eap->addr_count > 0) |
3819 { | 3819 { |
3820 if (qi == NULL) | 3820 if (qi == NULL) |
3821 { | 3821 { |
3822 emsg(_(e_loclist)); | 3822 emsg(_(e_no_location_list)); |
3823 return; | 3823 return; |
3824 } | 3824 } |
3825 | 3825 |
3826 // Jump to the specified quickfix list | 3826 // Jump to the specified quickfix list |
3827 if (eap->line2 > 0 && eap->line2 <= qi->qf_listcount) | 3827 if (eap->line2 > 0 && eap->line2 <= qi->qf_listcount) |
4889 | 4889 |
4890 if (*p_mef == NUL) | 4890 if (*p_mef == NUL) |
4891 { | 4891 { |
4892 name = vim_tempname('e', FALSE); | 4892 name = vim_tempname('e', FALSE); |
4893 if (name == NULL) | 4893 if (name == NULL) |
4894 emsg(_(e_notmp)); | 4894 emsg(_(e_cant_get_temp_file_name)); |
4895 return name; | 4895 return name; |
4896 } | 4896 } |
4897 | 4897 |
4898 for (p = p_mef; *p; ++p) | 4898 for (p = p_mef; *p; ++p) |
4899 if (p[0] == '#' && p[1] == '#') | 4899 if (p[0] == '#' && p[1] == '#') |
6123 | 6123 |
6124 // Parse the list of arguments, wildcards have already been expanded. | 6124 // Parse the list of arguments, wildcards have already been expanded. |
6125 if ((get_arglist_exp(p, &args->fcount, &args->fnames, TRUE) == FAIL) || | 6125 if ((get_arglist_exp(p, &args->fcount, &args->fnames, TRUE) == FAIL) || |
6126 args->fcount == 0) | 6126 args->fcount == 0) |
6127 { | 6127 { |
6128 emsg(_(e_nomatch)); | 6128 emsg(_(e_no_match)); |
6129 return FAIL; | 6129 return FAIL; |
6130 } | 6130 } |
6131 | 6131 |
6132 return OK; | 6132 return OK; |
6133 } | 6133 } |
6392 if ((args.flags & VGR_NOJUMP) == 0) | 6392 if ((args.flags & VGR_NOJUMP) == 0) |
6393 vgr_jump_to_match(qi, eap->forceit, &redraw_for_dummy, | 6393 vgr_jump_to_match(qi, eap->forceit, &redraw_for_dummy, |
6394 first_match_buf, target_dir); | 6394 first_match_buf, target_dir); |
6395 } | 6395 } |
6396 else | 6396 else |
6397 semsg(_(e_nomatch2), args.spat); | 6397 semsg(_(e_no_match_str_2), args.spat); |
6398 | 6398 |
6399 decr_quickfix_busy(); | 6399 decr_quickfix_busy(); |
6400 | 6400 |
6401 // If we loaded a dummy buffer into the current window, the autocommands | 6401 // If we loaded a dummy buffer into the current window, the autocommands |
6402 // may have messed up things, need to redraw and recompute folds. | 6402 // may have messed up things, need to redraw and recompute folds. |
8291 | 8291 |
8292 // Jump to first match. | 8292 // Jump to first match. |
8293 if (!qf_list_empty(qf_get_curlist(qi))) | 8293 if (!qf_list_empty(qf_get_curlist(qi))) |
8294 qf_jump(qi, 0, 0, FALSE); | 8294 qf_jump(qi, 0, 0, FALSE); |
8295 else | 8295 else |
8296 semsg(_(e_nomatch2), eap->arg); | 8296 semsg(_(e_no_match_str_2), eap->arg); |
8297 | 8297 |
8298 decr_quickfix_busy(); | 8298 decr_quickfix_busy(); |
8299 | 8299 |
8300 if (eap->cmdidx == CMD_lhelpgrep) | 8300 if (eap->cmdidx == CMD_lhelpgrep) |
8301 { | 8301 { |
8334 | 8334 |
8335 if (d != NULL) | 8335 if (d != NULL) |
8336 qf_get_properties(wp, d, rettv->vval.v_dict); | 8336 qf_get_properties(wp, d, rettv->vval.v_dict); |
8337 } | 8337 } |
8338 else | 8338 else |
8339 emsg(_(e_dictreq)); | 8339 emsg(_(e_dictionary_required)); |
8340 } | 8340 } |
8341 } | 8341 } |
8342 } | 8342 } |
8343 # endif | 8343 # endif |
8344 | 8344 |
8395 | 8395 |
8396 rettv->vval.v_number = -1; | 8396 rettv->vval.v_number = -1; |
8397 | 8397 |
8398 # ifdef FEAT_QUICKFIX | 8398 # ifdef FEAT_QUICKFIX |
8399 if (list_arg->v_type != VAR_LIST) | 8399 if (list_arg->v_type != VAR_LIST) |
8400 emsg(_(e_listreq)); | 8400 emsg(_(e_list_required)); |
8401 else if (recursive != 0) | 8401 else if (recursive != 0) |
8402 emsg(_(e_au_recursive)); | 8402 emsg(_(e_au_recursive)); |
8403 else | 8403 else |
8404 { | 8404 { |
8405 list_T *l = list_arg->vval.v_list; | 8405 list_T *l = list_arg->vval.v_list; |
8418 semsg(_(e_invact), act); | 8418 semsg(_(e_invact), act); |
8419 } | 8419 } |
8420 else if (action_arg->v_type == VAR_UNKNOWN) | 8420 else if (action_arg->v_type == VAR_UNKNOWN) |
8421 action = ' '; | 8421 action = ' '; |
8422 else | 8422 else |
8423 emsg(_(e_stringreq)); | 8423 emsg(_(e_string_required)); |
8424 | 8424 |
8425 if (action_arg->v_type != VAR_UNKNOWN | 8425 if (action_arg->v_type != VAR_UNKNOWN |
8426 && what_arg->v_type != VAR_UNKNOWN) | 8426 && what_arg->v_type != VAR_UNKNOWN) |
8427 { | 8427 { |
8428 if (what_arg->v_type == VAR_DICT && what_arg->vval.v_dict != NULL) | 8428 if (what_arg->v_type == VAR_DICT && what_arg->vval.v_dict != NULL) |
8429 what = what_arg->vval.v_dict; | 8429 what = what_arg->vval.v_dict; |
8430 else | 8430 else |
8431 { | 8431 { |
8432 emsg(_(e_dictreq)); | 8432 emsg(_(e_dictionary_required)); |
8433 valid_dict = FALSE; | 8433 valid_dict = FALSE; |
8434 } | 8434 } |
8435 } | 8435 } |
8436 | 8436 |
8437 ++recursive; | 8437 ++recursive; |