mirror of
https://github.com/neovim/neovim.git
synced 2025-09-10 13:28:19 +00:00
API: Implement vim_get_buffer_count
This commit is contained in:
@@ -173,7 +173,15 @@ void vim_err_write(String str)
|
||||
|
||||
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)
|
||||
|
Reference in New Issue
Block a user