mirror of
https://github.com/vim/vim.git
synced 2025-09-29 04:34:16 -04:00
patch 8.1.0166: using dict_add_nr_str() is clumsy
Problem: Using dict_add_nr_str() is clumsy. Solution: Split into two functions. (Ozaki Kiichi, closes #3154)
This commit is contained in:
10
src/undo.c
10
src/undo.c
@@ -3567,14 +3567,14 @@ u_eval_tree(u_header_T *first_uhp, list_T *list)
|
||||
dict = dict_alloc();
|
||||
if (dict == NULL)
|
||||
return;
|
||||
dict_add_nr_str(dict, "seq", uhp->uh_seq, NULL);
|
||||
dict_add_nr_str(dict, "time", (long)uhp->uh_time, NULL);
|
||||
dict_add_number(dict, "seq", uhp->uh_seq);
|
||||
dict_add_number(dict, "time", (long)uhp->uh_time);
|
||||
if (uhp == curbuf->b_u_newhead)
|
||||
dict_add_nr_str(dict, "newhead", 1, NULL);
|
||||
dict_add_number(dict, "newhead", 1);
|
||||
if (uhp == curbuf->b_u_curhead)
|
||||
dict_add_nr_str(dict, "curhead", 1, NULL);
|
||||
dict_add_number(dict, "curhead", 1);
|
||||
if (uhp->uh_save_nr > 0)
|
||||
dict_add_nr_str(dict, "save", uhp->uh_save_nr, NULL);
|
||||
dict_add_number(dict, "save", uhp->uh_save_nr);
|
||||
|
||||
if (uhp->uh_alt_next.ptr != NULL)
|
||||
{
|
||||
|
Reference in New Issue
Block a user