diff options
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r-- | src/nvim/eval.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 382b43826d..fd2c3a6dd8 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -5399,7 +5399,6 @@ static int list_join(garray_T *gap, list_T *l, char_u *sep, int echo_style, int int garbage_collect(void) { int copyID; - buf_T *buf; win_T *wp; funccall_T *fc, **pfc; int did_free; @@ -7208,13 +7207,15 @@ static buf_T *find_buffer(typval_T *avar) if (buf == NULL) { /* No full path name match, try a match with a URL or a "nofile" * buffer, these don't use the full path. */ - FOR_ALL_BUFFERS(buf) { - if (buf->b_fname != NULL - && (path_with_url(buf->b_fname) - || bt_nofile(buf) + FOR_ALL_BUFFERS(bp) { + if (bp->b_fname != NULL + && (path_with_url(bp->b_fname) + || bt_nofile(bp) ) - && STRCMP(buf->b_fname, avar->vval.v_string) == 0) + && STRCMP(bp->b_fname, avar->vval.v_string) == 0) { + buf = bp; break; + } } } } @@ -10617,7 +10618,6 @@ static void f_keys(typval_T *argvars, typval_T *rettv) static void f_last_buffer_nr(typval_T *argvars, typval_T *rettv) { int n = 0; - buf_T *buf; FOR_ALL_BUFFERS(buf) { if (n < buf->b_fnum) { |