comparison src/undo.c @ 10359:66f1b5bf3fa6 v8.0.0074

commit https://github.com/vim/vim/commit/95f096030ed1a8afea028f2ea295d6f6a70f466f Author: Bram Moolenaar <Bram@vim.org> Date: Thu Nov 10 20:01:45 2016 +0100 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.
author Christian Brabandt <cb@256bit.org>
date Thu, 10 Nov 2016 20:15:05 +0100
parents 9d282593ba24
children de77fa909414
comparison
equal deleted inserted replaced
10358:d85831f406d3 10359:66f1b5bf3fa6
2580 2580
2581 uhp = uhp->uh_prev.ptr; 2581 uhp = uhp->uh_prev.ptr;
2582 if (uhp == NULL || uhp->uh_walk != mark) 2582 if (uhp == NULL || uhp->uh_walk != mark)
2583 { 2583 {
2584 /* Need to redo more but can't find it... */ 2584 /* Need to redo more but can't find it... */
2585 EMSG2(_(e_intern2), "undo_time()"); 2585 internal_error("undo_time()");
2586 break; 2586 break;
2587 } 2587 }
2588 } 2588 }
2589 } 2589 }
2590 u_undo_end(did_undo, absolute); 2590 u_undo_end(did_undo, absolute);
2652 || bot > curbuf->b_ml.ml_line_count + 1) 2652 || bot > curbuf->b_ml.ml_line_count + 1)
2653 { 2653 {
2654 #ifdef FEAT_AUTOCMD 2654 #ifdef FEAT_AUTOCMD
2655 unblock_autocmds(); 2655 unblock_autocmds();
2656 #endif 2656 #endif
2657 EMSG(_("E438: u_undo: line numbers wrong")); 2657 IEMSG(_("E438: u_undo: line numbers wrong"));
2658 changed(); /* don't want UNCHANGED now */ 2658 changed(); /* don't want UNCHANGED now */
2659 return; 2659 return;
2660 } 2660 }
2661 2661
2662 oldsize = bot - top - 1; /* number of lines before undo */ 2662 oldsize = bot - top - 1; /* number of lines before undo */
3232 static u_entry_T * 3232 static u_entry_T *
3233 u_get_headentry(void) 3233 u_get_headentry(void)
3234 { 3234 {
3235 if (curbuf->b_u_newhead == NULL || curbuf->b_u_newhead->uh_entry == NULL) 3235 if (curbuf->b_u_newhead == NULL || curbuf->b_u_newhead->uh_entry == NULL)
3236 { 3236 {
3237 EMSG(_("E439: undo list corrupt")); 3237 IEMSG(_("E439: undo list corrupt"));
3238 return NULL; 3238 return NULL;
3239 } 3239 }
3240 return curbuf->b_u_newhead->uh_entry; 3240 return curbuf->b_u_newhead->uh_entry;
3241 } 3241 }
3242 3242
3264 */ 3264 */
3265 extra = curbuf->b_ml.ml_line_count - uep->ue_lcount; 3265 extra = curbuf->b_ml.ml_line_count - uep->ue_lcount;
3266 uep->ue_bot = uep->ue_top + uep->ue_size + 1 + extra; 3266 uep->ue_bot = uep->ue_top + uep->ue_size + 1 + extra;
3267 if (uep->ue_bot < 1 || uep->ue_bot > curbuf->b_ml.ml_line_count) 3267 if (uep->ue_bot < 1 || uep->ue_bot > curbuf->b_ml.ml_line_count)
3268 { 3268 {
3269 EMSG(_("E440: undo line missing")); 3269 IEMSG(_("E440: undo line missing"));
3270 uep->ue_bot = uep->ue_top + 1; /* assume all lines deleted, will 3270 uep->ue_bot = uep->ue_top + 1; /* assume all lines deleted, will
3271 * get all the old lines back 3271 * get all the old lines back
3272 * without deleting the current 3272 * without deleting the current
3273 * ones */ 3273 * ones */
3274 } 3274 }