aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/buffer.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-07-18 13:42:07 +0200
committerGitHub <noreply@github.com>2018-07-18 13:42:07 +0200
commit44b4f8c6e9645da133a9f222640d3a2b0f3e45f7 (patch)
tree3e55cbeaac59b359e21c79e38c1e5c900dfb7af4 /src/nvim/api/buffer.c
parentcd6e7e8cf302f7d2397c89a65a483f9cd543f9dd (diff)
parent061545068816ac346addf0fecdc2f554983251f4 (diff)
downloadrneovim-44b4f8c6e9645da133a9f222640d3a2b0f3e45f7.tar.gz
rneovim-44b4f8c6e9645da133a9f222640d3a2b0f3e45f7.tar.bz2
rneovim-44b4f8c6e9645da133a9f222640d3a2b0f3e45f7.zip
Merge #8679 from justinmk/doc
Diffstat (limited to 'src/nvim/api/buffer.c')
-rw-r--r--src/nvim/api/buffer.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/nvim/api/buffer.c b/src/nvim/api/buffer.c
index b5dd72c513..8ff24b877e 100644
--- a/src/nvim/api/buffer.c
+++ b/src/nvim/api/buffer.c
@@ -191,11 +191,11 @@ ArrayOf(String) buffer_get_line_slice(Buffer buffer,
return nvim_buf_get_lines(0, buffer, start , end, false, err);
}
-/// Retrieves a line range from the buffer
+/// Gets a line-range from the buffer.
///
/// Indexing is zero-based, end-exclusive. Negative indices are interpreted
-/// as length+1+index, i e -1 refers to the index past the end. So to get the
-/// last element set start=-2 and end=-1.
+/// as length+1+index: -1 refers to the index past the end. So to get the
+/// last element use start=-2 and end=-1.
///
/// Out-of-bounds indices are clamped to the nearest valid value, unless
/// `strict_indexing` is set.
@@ -286,14 +286,14 @@ void buffer_set_line_slice(Buffer buffer,
}
-/// Replaces line range on the buffer
+/// Sets (replaces) a line-range in the buffer.
///
/// Indexing is zero-based, end-exclusive. Negative indices are interpreted
-/// as length+1+index, i e -1 refers to the index past the end. So to change
-/// or delete the last element set start=-2 and end=-1.
+/// as length+1+index: -1 refers to the index past the end. So to change
+/// or delete the last element use start=-2 and end=-1.
///
-/// To insert lines at a given index, set both start and end to the same index.
-/// To delete a range of lines, set replacement to an empty array.
+/// To insert lines at a given index, set `start` and `end` to the same index.
+/// To delete a range of lines, set `replacement` to an empty array.
///
/// Out-of-bounds indices are clamped to the nearest valid value, unless
/// `strict_indexing` is set.