diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-07-10 22:11:16 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-07-10 22:11:16 +0200 |
commit | 7c0a2f367f2507669560b1a66423155c70d2e75b (patch) | |
tree | 7cd0523311a25f653497197abc1fa86ed62bcc79 /src/eval.c | |
parent | ea3f2e7be447a8f0c4436869620f908de5e8ef1e (diff) | |
download | vim-7c0a2f367f2507669560b1a66423155c70d2e75b.zip |
patch 7.4.2024
Problem: More buf_valid() calls can be optimized.
Solution: Use bufref_valid() instead.
Diffstat (limited to 'src/eval.c')
-rw-r--r-- | src/eval.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/eval.c b/src/eval.c index b68fcfda5..a9504363d 100644 --- a/src/eval.c +++ b/src/eval.c @@ -10503,8 +10503,9 @@ f_ch_getbufnr(typval_T *argvars, typval_T *rettv) part = PART_IN; else part = PART_SOCK; - if (channel->ch_part[part].ch_buffer != NULL) - rettv->vval.v_number = channel->ch_part[part].ch_buffer->b_fnum; + if (channel->ch_part[part].ch_bufref.br_buf != NULL) + rettv->vval.v_number = + channel->ch_part[part].ch_bufref.br_buf->b_fnum; } } |