diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2014-06-30 03:57:59 -0400 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2014-06-30 03:57:59 -0400 |
commit | e4abb9e09a0588177f99235526d3fab5d64345b2 (patch) | |
tree | 28b0265ba05af45cdaa983462564fbba186f135b /src/nvim/undo.c | |
parent | 2ddeb74202633784b9ebb4b963e2df06ed7332df (diff) | |
parent | 5ed74cfb7c67f79441343ec90548f333dad1729b (diff) | |
download | rneovim-e4abb9e09a0588177f99235526d3fab5d64345b2.tar.gz rneovim-e4abb9e09a0588177f99235526d3fab5d64345b2.tar.bz2 rneovim-e4abb9e09a0588177f99235526d3fab5d64345b2.zip |
Merge #830 'GA_APPEND() and GA_APPEND_VIA_PTR()'
Diffstat (limited to 'src/nvim/undo.c')
-rw-r--r-- | src/nvim/undo.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/nvim/undo.c b/src/nvim/undo.c index 37fa150aee..8fe05290c2 100644 --- a/src/nvim/undo.c +++ b/src/nvim/undo.c @@ -2249,7 +2249,6 @@ void ex_undolist(exarg_T *eap) while (uhp != NULL) { if (uhp->uh_prev.ptr == NULL && uhp->uh_walk != nomark && uhp->uh_walk != mark) { - ga_grow(&ga, 1); vim_snprintf((char *)IObuff, IOSIZE, "%6ld %7ld ", uhp->uh_seq, changes); u_add_time(IObuff + STRLEN(IObuff), IOSIZE - STRLEN(IObuff), @@ -2260,7 +2259,7 @@ void ex_undolist(exarg_T *eap) vim_snprintf_add((char *)IObuff, IOSIZE, " %3ld", uhp->uh_save_nr); } - ((char_u **)(ga.ga_data))[ga.ga_len++] = vim_strsave(IObuff); + GA_APPEND(char_u *, &ga, vim_strsave(IObuff)); } uhp->uh_walk = mark; |