diff src/ex_eval.c @ 26917:d91aea2a612c v8.2.3987

patch 8.2.3987: error messages are spread out Commit: https://github.com/vim/vim/commit/1d423ef75fc8bce2edfd2aab61cc9beaa63e31aa Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jan 2 21:26:16 2022 +0000 patch 8.2.3987: error messages are spread out Problem: Error messages are spread out. Solution: Move more error messages to errors.h.
author Bram Moolenaar <Bram@vim.org>
date Sun, 02 Jan 2022 22:30:04 +0100
parents 612339679616
children 51ddf6740ac6
line wrap: on
line diff
--- a/src/ex_eval.c
+++ b/src/ex_eval.c
@@ -1017,7 +1017,7 @@ ex_if(exarg_T *eap)
     cstack_T	*cstack = eap->cstack;
 
     if (cstack->cs_idx == CSTACK_LEN - 1)
-	eap->errmsg = _("E579: :if nesting too deep");
+	eap->errmsg = _(e_if_nesting_too_deep);
     else
     {
 	enter_block(cstack);
@@ -1111,10 +1111,10 @@ ex_else(exarg_T *eap)
     {
 	if (eap->cmdidx == CMD_else)
 	{
-	    eap->errmsg = _("E583: multiple :else");
+	    eap->errmsg = _(e_multiple_else);
 	    return;
 	}
-	eap->errmsg = _("E584: :elseif after :else");
+	eap->errmsg = _(e_elseif_after_else);
 	skip = TRUE;
     }
 
@@ -1180,7 +1180,7 @@ ex_while(exarg_T *eap)
     cstack_T	*cstack = eap->cstack;
 
     if (cstack->cs_idx == CSTACK_LEN - 1)
-	eap->errmsg = _("E585: :while/:for nesting too deep");
+	eap->errmsg = _(e_while_for_nesting_too_deep);
     else
     {
 	/*
@@ -1465,7 +1465,7 @@ ex_block(exarg_T *eap)
     cstack_T	*cstack = eap->cstack;
 
     if (cstack->cs_idx == CSTACK_LEN - 1)
-	eap->errmsg = _("E579: block nesting too deep");
+	eap->errmsg = _(e_block_nesting_too_deep);
     else
     {
 	enter_block(cstack);