patch 8.0.0074
Problem: Cannot make Vim fail on an internal error.
Solution: Add IEMSG() and IEMSG2(). (Domenique Pelle) Avoid reporting an
internal error without mentioning where.
diff --git a/src/misc2.c b/src/misc2.c
index 3803249..27d26be 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -918,7 +918,7 @@
{
/* Don't hide this message */
emsg_silent = 0;
- EMSGN(_("E341: Internal error: lalloc(%ld, )"), size);
+ IEMSGN(_("E341: Internal error: lalloc(%ld, )"), size);
return NULL;
}
@@ -1075,7 +1075,7 @@
p_ea = FALSE;
if (first_tabpage->tp_next != NULL)
do_cmdline_cmd((char_u *)"tabonly!");
- if (firstwin != lastwin)
+ if (!ONE_WINDOW)
do_cmdline_cmd((char_u *)"only!");
# endif
@@ -6040,32 +6040,6 @@
}
#endif
-/*
- * Print an error message with one or two "%s" and one or two string arguments.
- * This is not in message.c to avoid a warning for prototypes.
- */
- int
-emsg3(char_u *s, char_u *a1, char_u *a2)
-{
- if (emsg_not_now())
- return TRUE; /* no error messages at the moment */
- vim_snprintf((char *)IObuff, IOSIZE, (char *)s, a1, a2);
- return emsg(IObuff);
-}
-
-/*
- * Print an error message with one "%ld" and one long int argument.
- * This is not in message.c to avoid a warning for prototypes.
- */
- int
-emsgn(char_u *s, long n)
-{
- if (emsg_not_now())
- return TRUE; /* no error messages at the moment */
- vim_snprintf((char *)IObuff, IOSIZE, (char *)s, n);
- return emsg(IObuff);
-}
-
#if defined(FEAT_SPELL) || defined(FEAT_PERSISTENT_UNDO) || defined(PROTO)
/*
* Read 2 bytes from "fd" and turn them into an int, MSB first.