Mercurial > vim
diff src/eval.c @ 9487:69ed2c9d34a6 v7.4.2024
commit https://github.com/vim/vim/commit/7c0a2f367f2507669560b1a66423155c70d2e75b
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jul 10 22:11:16 2016 +0200
patch 7.4.2024
Problem: More buf_valid() calls can be optimized.
Solution: Use bufref_valid() instead.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 10 Jul 2016 22:15:06 +0200 |
parents | d735119cc327 |
children | 404de131cff9 |
line wrap: on
line diff
--- a/src/eval.c +++ b/src/eval.c @@ -10503,8 +10503,9 @@ f_ch_getbufnr(typval_T *argvars, typval_ 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; } }