0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

patch 8.2.3957: error messages are spread out

Problem:    Error messages are spread out.
Solution:   Move more errors to errors.h.
This commit is contained in:
Bram Moolenaar
2021-12-31 17:25:48 +00:00
parent 4b1478093e
commit 1a9922243a
15 changed files with 112 additions and 51 deletions

View File

@@ -1413,7 +1413,7 @@ ex_endwhile(exarg_T *eap)
if (!(fl & (CSF_WHILE | CSF_FOR)))
{
if (!(fl & CSF_TRY))
eap->errmsg = _(e_endif);
eap->errmsg = _(e_missing_endif);
else if (fl & CSF_FINALLY)
eap->errmsg = _(e_endtry);
// Try to find the matching ":while" and report what's missing.
@@ -2484,10 +2484,10 @@ cleanup_conditionals(
get_end_emsg(cstack_T *cstack)
{
if (cstack->cs_flags[cstack->cs_idx] & CSF_WHILE)
return _(e_endwhile);
return _(e_missing_endwhile);
if (cstack->cs_flags[cstack->cs_idx] & CSF_FOR)
return _(e_endfor);
return _(e_endif);
return _(e_missing_endfor);
return _(e_missing_endif);
}