Mercurial > vim
comparison src/undo.c @ 2282:a888ed7ba375 vim73
Make updating text for conceal mode simpler. A few compiler warning fixes.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Fri, 02 Jul 2010 20:20:09 +0200 |
parents | e41433ea71df |
children | 4dda2bd944e1 |
comparison
equal
deleted
inserted
replaced
2281:e41433ea71df | 2282:a888ed7ba375 |
---|---|
1549 colnr_T line_colnr; | 1549 colnr_T line_colnr; |
1550 linenr_T line_count; | 1550 linenr_T line_count; |
1551 int num_head = 0; | 1551 int num_head = 0; |
1552 long old_header_seq, new_header_seq, cur_header_seq; | 1552 long old_header_seq, new_header_seq, cur_header_seq; |
1553 long seq_last, seq_cur; | 1553 long seq_last, seq_cur; |
1554 long_u last_save_nr = 0; | 1554 long last_save_nr = 0; |
1555 short old_idx = -1, new_idx = -1, cur_idx = -1; | 1555 short old_idx = -1, new_idx = -1, cur_idx = -1; |
1556 long num_read_uhps = 0; | 1556 long num_read_uhps = 0; |
1557 time_t seq_time; | 1557 time_t seq_time; |
1558 int i, j; | 1558 int i, j; |
1559 int c; | 1559 int c; |
2660 if (uhp == NULL) | 2660 if (uhp == NULL) |
2661 *msgbuf = NUL; | 2661 *msgbuf = NUL; |
2662 else | 2662 else |
2663 u_add_time(msgbuf, sizeof(msgbuf), uhp->uh_time); | 2663 u_add_time(msgbuf, sizeof(msgbuf), uhp->uh_time); |
2664 | 2664 |
2665 #ifdef FEAT_CONCEAL | |
2666 { | |
2667 win_T *wp; | |
2668 | |
2669 FOR_ALL_WINDOWS(wp) | |
2670 { | |
2671 if (wp->w_buffer == curbuf && wp->w_p_conceal) | |
2672 redraw_win_later(wp, NOT_VALID); | |
2673 } | |
2674 } | |
2675 #endif | |
2676 | |
2665 smsg((char_u *)_("%ld %s; %s #%ld %s"), | 2677 smsg((char_u *)_("%ld %s; %s #%ld %s"), |
2666 u_oldcount < 0 ? -u_oldcount : u_oldcount, | 2678 u_oldcount < 0 ? -u_oldcount : u_oldcount, |
2667 _(msgstr), | 2679 _(msgstr), |
2668 did_undo ? _("before") : _("after"), | 2680 did_undo ? _("before") : _("after"), |
2669 uhp == NULL ? 0L : uhp->uh_seq, | 2681 uhp == NULL ? 0L : uhp->uh_seq, |
3228 { | 3240 { |
3229 dict = dict_alloc(); | 3241 dict = dict_alloc(); |
3230 if (dict == NULL) | 3242 if (dict == NULL) |
3231 return; | 3243 return; |
3232 dict_add_nr_str(dict, "seq", uhp->uh_seq, NULL); | 3244 dict_add_nr_str(dict, "seq", uhp->uh_seq, NULL); |
3233 dict_add_nr_str(dict, "time", uhp->uh_time, NULL); | 3245 dict_add_nr_str(dict, "time", (long)uhp->uh_time, NULL); |
3234 if (uhp == curbuf->b_u_newhead) | 3246 if (uhp == curbuf->b_u_newhead) |
3235 dict_add_nr_str(dict, "newhead", 1, NULL); | 3247 dict_add_nr_str(dict, "newhead", 1, NULL); |
3236 if (uhp == curbuf->b_u_curhead) | 3248 if (uhp == curbuf->b_u_curhead) |
3237 dict_add_nr_str(dict, "curhead", 1, NULL); | 3249 dict_add_nr_str(dict, "curhead", 1, NULL); |
3238 if (uhp->uh_save_nr > 0) | 3250 if (uhp->uh_save_nr > 0) |