mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
API: Implement buffer_get_length
This commit is contained in:
parent
73dbb97f8e
commit
417a61f54f
@ -37,7 +37,13 @@ static int64_t normalize_index(buf_T *buf, int64_t index);
|
|||||||
|
|
||||||
int64_t buffer_get_length(Buffer buffer, Error *err)
|
int64_t buffer_get_length(Buffer buffer, Error *err)
|
||||||
{
|
{
|
||||||
abort();
|
buf_T *buf = find_buffer(buffer, err);
|
||||||
|
|
||||||
|
if (!buf) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return buf->b_ml.ml_line_count;
|
||||||
}
|
}
|
||||||
|
|
||||||
String buffer_get_line(Buffer buffer, int64_t index, Error *err)
|
String buffer_get_line(Buffer buffer, int64_t index, Error *err)
|
||||||
|
Loading…
Reference in New Issue
Block a user