diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-08-22 18:34:52 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-22 18:34:52 -0400 |
commit | 8c49e3d50959e24dadd688f56a18f104bd5fd934 (patch) | |
tree | e75e6d0435ce10e9df427c5b11e943127dad0983 /src/nvim/buffer.c | |
parent | 161cdba1e3b8b53f474b2e76655c8c1a5217802f (diff) | |
parent | 246c510b6022b7155c9b78767c41094df7cb2be8 (diff) | |
download | rneovim-8c49e3d50959e24dadd688f56a18f104bd5fd934.tar.gz rneovim-8c49e3d50959e24dadd688f56a18f104bd5fd934.tar.bz2 rneovim-8c49e3d50959e24dadd688f56a18f104bd5fd934.zip |
Merge pull request #12770 from janlazo/vim-8.1.1115
vim-patch:8.1.{1115,2267},8.2.{607,814,1472,1474,1476,1511}
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r-- | src/nvim/buffer.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index b3bbdce9d9..4648631ebe 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -2650,7 +2650,7 @@ void buflist_list(exarg_T *eap) int i; garray_T buflist; - buf_T **buflist_data = NULL, **p; + buf_T **buflist_data = NULL; if (vim_strchr(eap->arg, 't')) { ga_init(&buflist, sizeof(buf_T *), 50); @@ -2662,13 +2662,14 @@ void buflist_list(exarg_T *eap) qsort(buflist.ga_data, (size_t)buflist.ga_len, sizeof(buf_T *), buf_time_compare); - p = buflist_data = (buf_T **)buflist.ga_data; - buf = *p; + buflist_data = (buf_T **)buflist.ga_data; + buf = *buflist_data; } + buf_T **p = buflist_data; for (; buf != NULL && !got_int; - buf = buflist_data + buf = buflist_data != NULL ? (++p < buflist_data + buflist.ga_len ? *p : NULL) : buf->b_next) { const bool is_terminal = buf->terminal; |