mirror of
https://github.com/neovim/neovim.git
synced 2025-11-08 11:35:10 +00:00
API: Implement buffer_get_length
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user