vim-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.

95f096030e

Signed-off-by: Michael Schupikov <michael@schupikov.de>
This commit is contained in:
Michael Schupikov
2017-09-23 09:56:44 +02:00
committed by James McCoy
parent 6ff13d78b7
commit d5bce42b52
20 changed files with 144 additions and 85 deletions

View File

@@ -2096,8 +2096,8 @@ void undo_time(long step, int sec, int file, int absolute)
uhp = uhp->uh_prev.ptr;
if (uhp == NULL || uhp->uh_walk != mark) {
/* Need to redo more but can't find it... */
EMSG2(_(e_intern2), "undo_time()");
// Need to redo more but can't find it...
internal_error("undo_time()");
break;
}
}
@@ -2163,8 +2163,8 @@ static void u_undoredo(int undo)
if (top > curbuf->b_ml.ml_line_count || top >= bot
|| bot > curbuf->b_ml.ml_line_count + 1) {
unblock_autocmds();
EMSG(_("E438: u_undo: line numbers wrong"));
changed(); /* don't want UNCHANGED now */
IEMSG(_("E438: u_undo: line numbers wrong"));
changed(); // don't want UNCHANGED now
return;
}
@@ -2655,7 +2655,7 @@ static void u_unch_branch(u_header_T *uhp)
static u_entry_T *u_get_headentry(void)
{
if (curbuf->b_u_newhead == NULL || curbuf->b_u_newhead->uh_entry == NULL) {
EMSG(_("E439: undo list corrupt"));
IEMSG(_("E439: undo list corrupt"));
return NULL;
}
return curbuf->b_u_newhead->uh_entry;
@@ -2684,11 +2684,11 @@ static void u_getbot(void)
extra = curbuf->b_ml.ml_line_count - uep->ue_lcount;
uep->ue_bot = uep->ue_top + uep->ue_size + 1 + extra;
if (uep->ue_bot < 1 || uep->ue_bot > curbuf->b_ml.ml_line_count) {
EMSG(_("E440: undo line missing"));
uep->ue_bot = uep->ue_top + 1; /* assume all lines deleted, will
* get all the old lines back
* without deleting the current
* ones */
IEMSG(_("E440: undo line missing"));
uep->ue_bot = uep->ue_top + 1; // assume all lines deleted, will
// get all the old lines back
// without deleting the current
// ones
}
curbuf->b_u_newhead->uh_getbot_entry = NULL;