patch 8.2.3983: error messages are spread out
Problem: Error messages are spread out.
Solution: Move more error messages to errors.h.
diff --git a/src/normal.c b/src/normal.c
index 165b185..79e47a6 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -128,8 +128,6 @@
#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 @@
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 @@
|| 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 @@
}
if (n == 0)
{
- emsg(_(e_noident)); // found dashes only
+ // found dashes only
+ emsg(_(e_no_identifier_under_cursor));
vim_free(buf);
return;
}