aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTJ DeVries <devries.timothyj@gmail.com>2021-01-01 14:24:40 -0500
committerTJ DeVries <devries.timothyj@gmail.com>2021-01-01 14:24:40 -0500
commit7718826edf0a4af175d230a691d9d9559f9d8acc (patch)
treea5b99eda8f800dafd364a1089c44513d2dc3a646
parentdac3b35ece131897b60fe271856f9b6f8bae8b96 (diff)
downloadrneovim-7718826edf0a4af175d230a691d9d9559f9d8acc.tar.gz
rneovim-7718826edf0a4af175d230a691d9d9559f9d8acc.tar.bz2
rneovim-7718826edf0a4af175d230a691d9d9559f9d8acc.zip
docs: nvim_buf_set_text
-rw-r--r--runtime/doc/api.txt28
1 files changed, 28 insertions, 0 deletions
diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt
index c4b4594290..485c93b0dd 100644
--- a/runtime/doc/api.txt
+++ b/runtime/doc/api.txt
@@ -1804,6 +1804,8 @@ nvim_buf_attach({buffer}, {send_buffer}, {opts}) *nvim_buf_attach()*
• utf_sizes: include UTF-32 and UTF-16 size
of the replaced region, as args to
`on_lines` .
+ • preview: also attach to command preview
+ (i.e. 'inccommand') events.
Return: ~
False if attach failed (invalid parameter, or buffer isn't
@@ -2208,6 +2210,32 @@ nvim_buf_set_option({buffer}, {name}, {value}) *nvim_buf_set_option()*
{name} Option name
{value} Option value
+ *nvim_buf_set_text()*
+nvim_buf_set_text({buffer}, {start_row}, {start_col}, {end_row}, {end_col},
+ {replacement})
+ Sets (replaces) a range in the buffer
+
+ This is recommended over nvim_buf_set_lines when only
+ modifying parts of a line, as extmarks will be preserved on
+ non-modified parts of the touched lines.
+
+ Indexing is zero-based and end-exclusive.
+
+ To insert text at a given index, set `start` and `end` ranges
+ to the same index. To delete a range, set `replacement` to an
+ array containing an empty string, or simply an empty array.
+
+ Prefer nvim_buf_set_lines when adding or deleting entire lines
+ only.
+
+ Parameters: ~
+ {buffer} Buffer handle, or 0 for current buffer
+ {start_row} First line index
+ {start_column} Last column
+ {end_row} Last line index
+ {end_column} Last column
+ {replacement} Array of lines to use as replacement
+
nvim_buf_set_var({buffer}, {name}, {value}) *nvim_buf_set_var()*
Sets a buffer-scoped (b:) variable