mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
API: Implement vim_get_buffer_count
This commit is contained in:
parent
c1d3539fb4
commit
c001cfdba0
@ -173,7 +173,15 @@ void vim_err_write(String str)
|
|||||||
|
|
||||||
int64_t vim_get_buffer_count(void)
|
int64_t vim_get_buffer_count(void)
|
||||||
{
|
{
|
||||||
abort();
|
buf_T *b = firstbuf;
|
||||||
|
uint64_t n = 0;
|
||||||
|
|
||||||
|
while (b) {
|
||||||
|
n++;
|
||||||
|
b = b->b_next;
|
||||||
|
}
|
||||||
|
|
||||||
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
Buffer vim_get_buffer(int64_t num, Error *err)
|
Buffer vim_get_buffer(int64_t num, Error *err)
|
||||||
|
Loading…
Reference in New Issue
Block a user