aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/buffer.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2024-09-24 04:46:50 -0700
committerGitHub <noreply@github.com>2024-09-24 04:46:50 -0700
commit3f6bc34e663c62bc8899dcdc65bf204b2ccfdaec (patch)
tree447732924440ecc91783e26232cd77dc80a1049b /src/nvim/api/buffer.c
parent2276743cb8e13483ba15695ef0a1ea65263e825f (diff)
downloadrneovim-3f6bc34e663c62bc8899dcdc65bf204b2ccfdaec.tar.gz
rneovim-3f6bc34e663c62bc8899dcdc65bf204b2ccfdaec.tar.bz2
rneovim-3f6bc34e663c62bc8899dcdc65bf204b2ccfdaec.zip
docs: lua error patterns #30240
Co-authored-by: Mathias Fussenegger <f.mathias@zignar.net> Co-authored-by: Ananth Bhaskararaman <antsub@gmail.com>
Diffstat (limited to 'src/nvim/api/buffer.c')
-rw-r--r--src/nvim/api/buffer.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/nvim/api/buffer.c b/src/nvim/api/buffer.c
index 3baf8a97d9..9480292d9a 100644
--- a/src/nvim/api/buffer.c
+++ b/src/nvim/api/buffer.c
@@ -462,12 +462,8 @@ end:
/// = row` and `start_col = end_col = col`. To delete the text in a range, use
/// `replacement = {}`.
///
-/// Prefer |nvim_buf_set_lines()| if you are only adding or deleting entire lines.
-///
-/// Prefer |nvim_put()| if you want to insert text at the cursor position.
-///
-/// @see |nvim_buf_set_lines()|
-/// @see |nvim_put()|
+/// @note Prefer |nvim_buf_set_lines()| (for performance) to add or delete entire lines.
+/// @note Prefer |nvim_paste()| or |nvim_put()| to insert (instead of replace) text at cursor.
///
/// @param channel_id
/// @param buffer Buffer handle, or 0 for current buffer