diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-12-31 22:49:24 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-12-31 22:49:24 +0000 |
commit | 436b5adc9770a2568209dd5ab1f98bd1afc91898 (patch) | |
tree | 623dc85ee9a396b16f939f44d38138f882edc229 /src/ex_docmd.c | |
parent | f1474d801bbdb73406dd3d1f931f515f99e86dfa (diff) | |
download | vim-git-436b5adc9770a2568209dd5ab1f98bd1afc91898.tar.gz |
patch 8.2.3961: error messages are spread outv8.2.3961
Problem: Error messages are spread out.
Solution: Move more errors to errors.h.
Diffstat (limited to 'src/ex_docmd.c')
-rw-r--r-- | src/ex_docmd.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c index 3b293e968..0403143cf 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -1212,7 +1212,7 @@ do_cmdline( && !func_has_ended(real_cookie)))) { if (cstack.cs_flags[cstack.cs_idx] & CSF_TRY) - emsg(_(e_endtry)); + emsg(_(e_missing_endtry)); else if (cstack.cs_flags[cstack.cs_idx] & CSF_WHILE) emsg(_(e_missing_endwhile)); else if (cstack.cs_flags[cstack.cs_idx] & CSF_FOR) @@ -2216,7 +2216,7 @@ do_one_cmd( while (ea.arg[0] == '+' && ea.arg[1] == '+') if (getargopt(&ea) == FAIL && !ni) { - errormsg = _(e_invarg); + errormsg = _(e_invalid_argument); goto doend; } @@ -2400,7 +2400,7 @@ do_one_cmd( if (!ni && (ea.argt & EX_NEEDARG) && *ea.arg == NUL) { - errormsg = _(e_argreq); + errormsg = _(e_argument_required); goto doend; } @@ -5939,7 +5939,7 @@ get_tabpage_arg(exarg_T *eap) tab_number = tabpage_index(lastused_tabpage); else { - eap->errmsg = ex_errmsg(e_invargval, eap->arg); + eap->errmsg = ex_errmsg(e_invalid_value_for_argument_str, eap->arg); tab_number = 0; goto theend; } @@ -5947,7 +5947,7 @@ get_tabpage_arg(exarg_T *eap) || tab_number > LAST_TAB_NR) { // No numbers as argument. - eap->errmsg = ex_errmsg(e_invarg2, eap->arg); + eap->errmsg = ex_errmsg(e_invalid_argument_str, eap->arg); goto theend; } } @@ -5959,7 +5959,7 @@ get_tabpage_arg(exarg_T *eap) || tab_number == 0) { // No numbers as argument. - eap->errmsg = ex_errmsg(e_invarg2, eap->arg); + eap->errmsg = ex_errmsg(e_invalid_argument_str, eap->arg); goto theend; } tab_number = tab_number * relative + tabpage_index(curtab); @@ -5967,7 +5967,7 @@ get_tabpage_arg(exarg_T *eap) --tab_number; } if (tab_number < unaccept_arg0 || tab_number > LAST_TAB_NR) - eap->errmsg = ex_errmsg(e_invarg2, eap->arg); + eap->errmsg = ex_errmsg(e_invalid_argument_str, eap->arg); } else if (eap->addr_count > 0) { @@ -6678,7 +6678,7 @@ ex_tabnext(exarg_T *eap) || tab_number == 0) { // No numbers as argument. - eap->errmsg = ex_errmsg(e_invarg2, eap->arg); + eap->errmsg = ex_errmsg(e_invalid_argument_str, eap->arg); return; } } @@ -7415,7 +7415,7 @@ changedir_func( || pathcmp((char *)pdir, (char *)new_dir, -1) != 0; if (dir_differs && vim_chdir(new_dir)) { - emsg(_(e_failed)); + emsg(_(e_command_failed)); vim_free(pdir); } else @@ -7541,7 +7541,7 @@ ex_sleep(exarg_T *eap) { case 'm': break; case NUL: len *= 1000L; break; - default: semsg(_(e_invarg2), eap->arg); return; + default: semsg(_(e_invalid_argument_str), eap->arg); return; } // Hide the cursor if invoked with ! @@ -7635,7 +7635,7 @@ ex_winsize(exarg_T *eap) if (!isdigit(*arg)) { - semsg(_(e_invarg2), arg); + semsg(_(e_invalid_argument_str), arg); return; } w = getdigits(&arg); @@ -7659,7 +7659,7 @@ ex_wincmd(exarg_T *eap) // CTRL-W g and CTRL-W CTRL-G have an extra command character if (eap->arg[1] == NUL) { - emsg(_(e_invarg)); + emsg(_(e_invalid_argument)); return; } xchar = eap->arg[1]; @@ -7676,7 +7676,7 @@ ex_wincmd(exarg_T *eap) #endif '"') && eap->nextcmd == NULL) - emsg(_(e_invarg)); + emsg(_(e_invalid_argument)); else if (!eap->skip) { // Pass flags on for ":vertical wincmd ]". @@ -8039,7 +8039,7 @@ ex_later(exarg_T *eap) } if (*p != NUL) - semsg(_(e_invarg2), eap->arg); + semsg(_(e_invalid_argument_str), eap->arg); else undo_time(eap->cmdidx == CMD_earlier ? -count : count, sec, file, FALSE); @@ -8135,7 +8135,7 @@ ex_redir(exarg_T *eap) if (*arg != NUL) { redir_reg = 0; - semsg(_(e_invarg2), eap->arg); + semsg(_(e_invalid_argument_str), eap->arg); } } else if (*arg == '=' && arg[1] == '>') @@ -8162,7 +8162,7 @@ ex_redir(exarg_T *eap) // TODO: redirect to a buffer else - semsg(_(e_invarg2), eap->arg); + semsg(_(e_invalid_argument_str), eap->arg); } // Make sure redirection is not off. Can happen for cmdline completion @@ -8326,7 +8326,7 @@ ex_mark(exarg_T *eap) return; #endif if (*eap->arg == NUL) // No argument? - emsg(_(e_argreq)); + emsg(_(e_argument_required)); else if (eap->arg[1] != NUL) // more than one character? semsg(_(e_trailing_arg), eap->arg); else @@ -9322,7 +9322,7 @@ ex_behave(exarg_T *eap) set_option_value((char_u *)"keymodel", 0L, (char_u *)"", 0); } else - semsg(_(e_invarg2), eap->arg); + semsg(_(e_invalid_argument_str), eap->arg); } static int filetype_detect = FALSE; @@ -9417,7 +9417,7 @@ ex_filetype(exarg_T *eap) } } else - semsg(_(e_invarg2), arg); + semsg(_(e_invalid_argument_str), arg); } /* |