aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorckipp01 <ckipp@pm.me>2022-05-17 15:35:53 +0200
committerckipp01 <ckipp@pm.me>2022-05-18 21:49:31 +0200
commit86db222469d7f20acfca7c69fab129577deb9291 (patch)
tree7f0c13b5dadc9d6b122a7a36f0af9eb67608f329 /src
parent6613f58cebde7db4e69709b84d511c32a7c4ce32 (diff)
downloadrneovim-86db222469d7f20acfca7c69fab129577deb9291.tar.gz
rneovim-86db222469d7f20acfca7c69fab129577deb9291.tar.bz2
rneovim-86db222469d7f20acfca7c69fab129577deb9291.zip
docs(extmark): remove message about passing in id=0
The docs for `nvim_buf_set_extmark` mention that you can create a new extmark when passing in `id=0`, however if you do this you'll get an error since the code checks that id is positive. ``` id is not a positive integer ``` This change re-words the sentence to make it clearer.
Diffstat (limited to 'src')
-rw-r--r--src/nvim/api/extmark.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/nvim/api/extmark.c b/src/nvim/api/extmark.c
index e05d80812d..9143f593b1 100644
--- a/src/nvim/api/extmark.c
+++ b/src/nvim/api/extmark.c
@@ -366,12 +366,11 @@ Array nvim_buf_get_extmarks(Buffer buffer, Integer ns_id, Object start, Object e
/// Creates or updates an extmark.
///
-/// To create a new extmark, pass id=0. The extmark id will be returned.
-/// To move an existing mark, pass its id.
-///
-/// It is also allowed to create a new mark by passing in a previously unused
-/// id, but the caller must then keep track of existing and unused ids itself.
-/// (Useful over RPC, to avoid waiting for the return value.)
+/// By default a new extmark is created when no id is passed in, but it is also
+/// possible to create a new mark by passing in a previously unused id or move
+/// an existing mark by passing in its id. The caller must then keep track of
+/// existing and unused ids itself. (Useful over RPC, to avoid waiting for the
+/// return value.)
///
/// Using the optional arguments, it is possible to use this to highlight
/// a range of text, and also to associate virtual text to the mark.