API: Implement vim_get_buffer_count

This commit is contained in:
Thiago de Arruda 2014-05-09 14:14:33 -03:00
parent c1d3539fb4
commit c001cfdba0

View File

@ -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)