0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 7.4.2024

Problem:    More buf_valid() calls can be optimized.
Solution:   Use bufref_valid() instead.
This commit is contained in:
Bram Moolenaar
2016-07-10 22:11:16 +02:00
parent ea3f2e7be4
commit 7c0a2f367f
21 changed files with 218 additions and 133 deletions

View File

@@ -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;
}
}