0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 8.2.3983: error messages are spread out

Problem:    Error messages are spread out.
Solution:   Move more error messages to errors.h.
This commit is contained in:
Bram Moolenaar
2022-01-02 17:00:40 +00:00
parent 8bfa0eb863
commit eaaac014a0
12 changed files with 163 additions and 64 deletions

View File

@@ -128,8 +128,6 @@ static void nv_drop(cmdarg_T *cap);
#endif
static void nv_cursorhold(cmdarg_T *cap);
static char *e_noident = N_("E349: No identifier under cursor");
/*
* Function to be called for a Normal or Visual mode command.
* The argument is a cmdarg_T.
@@ -1645,9 +1643,9 @@ find_ident_at_pos(
if ((find_type & FIND_NOERROR) == 0)
{
if (find_type & FIND_STRING)
emsg(_("E348: No string under cursor"));
emsg(_(e_no_string_under_cursor));
else
emsg(_(e_noident));
emsg(_(e_no_identifier_under_cursor));
}
return 0;
}
@@ -3683,7 +3681,7 @@ nv_ident(cmdarg_T *cap)
|| STRCMP(kp, ":help") == 0);
if (kp_help && *skipwhite(ptr) == NUL)
{
emsg(_(e_noident)); // found white space only
emsg(_(e_no_identifier_under_cursor)); // found white space only
return;
}
kp_ex = (*kp == ':');
@@ -3734,7 +3732,8 @@ nv_ident(cmdarg_T *cap)
}
if (n == 0)
{
emsg(_(e_noident)); // found dashes only
// found dashes only
emsg(_(e_no_identifier_under_cursor));
vim_free(buf);
return;
}