mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
API: Implement buffer_insert
This commit is contained in:
parent
0e3aa877c0
commit
550938e498
@ -315,9 +315,9 @@ bool buffer_is_valid(Buffer buffer)
|
|||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
void buffer_insert(Buffer buffer, StringArray lines, int64_t lnum, Error *err)
|
void buffer_insert(Buffer buffer, int64_t index, StringArray lines, Error *err)
|
||||||
{
|
{
|
||||||
abort();
|
buffer_set_slice(buffer, index, index, false, true, lines, err);
|
||||||
}
|
}
|
||||||
|
|
||||||
Position buffer_mark(Buffer buffer, String name, Error *err)
|
Position buffer_mark(Buffer buffer, String name, Error *err)
|
||||||
|
@ -127,11 +127,11 @@ bool buffer_is_valid(Buffer buffer);
|
|||||||
/// Inserts a sequence of lines to a buffer at a certain index
|
/// Inserts a sequence of lines to a buffer at a certain index
|
||||||
///
|
///
|
||||||
/// @param buffer The buffer handle
|
/// @param buffer The buffer handle
|
||||||
/// @param lines An array of lines
|
|
||||||
/// @param lnum Insert the lines before `lnum`. If negative, it will append
|
/// @param lnum Insert the lines before `lnum`. If negative, it will append
|
||||||
/// to the end of the buffer.
|
/// to the end of the buffer.
|
||||||
|
/// @param lines An array of lines
|
||||||
/// @param[out] err Details of an error that may have occurred
|
/// @param[out] err Details of an error that may have occurred
|
||||||
void buffer_insert(Buffer buffer, StringArray lines, int64_t lnum, Error *err);
|
void buffer_insert(Buffer buffer, int64_t index, StringArray lines, Error *err);
|
||||||
|
|
||||||
/// Creates a mark in the buffer and returns a tuple(row, col) representing
|
/// Creates a mark in the buffer and returns a tuple(row, col) representing
|
||||||
/// the position of the named mark
|
/// the position of the named mark
|
||||||
|
Loading…
Reference in New Issue
Block a user