diff options
author | Thiago de Arruda <tpadilha84@gmail.com> | 2014-05-10 18:32:33 -0300 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2014-05-13 14:11:22 -0300 |
commit | 4dc34bc0e052320feebdc3a9aed0df1d3e8af181 (patch) | |
tree | 4f20fe4293ea473d61b1a71c3845a9743e56b27c /src/api/buffer.h | |
parent | 417a61f54f6ca9b05454bae4c5dc6c2c8ff2d6af (diff) | |
download | rneovim-4dc34bc0e052320feebdc3a9aed0df1d3e8af181.tar.gz rneovim-4dc34bc0e052320feebdc3a9aed0df1d3e8af181.tar.bz2 rneovim-4dc34bc0e052320feebdc3a9aed0df1d3e8af181.zip |
API: Implement buffer_{get,set}_slice
Diffstat (limited to 'src/api/buffer.h')
-rw-r--r-- | src/api/buffer.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/api/buffer.h b/src/api/buffer.h index 3459ce8e45..49379e3bc9 100644 --- a/src/api/buffer.h +++ b/src/api/buffer.h @@ -34,25 +34,34 @@ void buffer_set_line(Buffer buffer, int64_t index, Object line, Error *err); /// /// @param buffer The buffer handle /// @param start The first line index -/// @param end The last line index(exclusive) +/// @param end The last line index +/// @param include_start True if the slice includes the `start` parameter +/// @param include_end True if the slice includes the `end` parameter /// @param[out] err Details of an error that may have occurred /// @return An array of lines StringArray buffer_get_slice(Buffer buffer, int64_t start, int64_t end, + bool include_start, + bool include_end, Error *err); /// Replaces a line range on the buffer /// /// @param buffer The buffer handle /// @param start The first line index -/// @param end The last line index(exclusive) -/// @param lines An array of lines to use as replacement +/// @param end The last line index +/// @param include_start True if the slice includes the `start` parameter +/// @param include_end True if the slice includes the `end` parameter +/// @param lines An array of lines to use as replacement(A 0-length array +/// will simply delete the line range) /// @param[out] err Details of an error that may have occurred void buffer_set_slice(Buffer buffer, int64_t start, int64_t end, - StringArray lines, + bool include_start, + bool include_end, + StringArray replacement, Error *err); /// Gets a buffer variable |