fix(api): more intuitive cursor updates in nvim_buf_set_text

Fixes #22526
This commit is contained in:
Sergey Slipchenko
2023-09-11 08:16:03 +04:00
parent 2b475cb5cc
commit d22172f36b
6 changed files with 790 additions and 47 deletions

View File

@@ -621,6 +621,7 @@ function vim.api.nvim_buf_set_option(buffer, name, value) end
--- 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.
---
--- @param buffer integer Buffer handle, or 0 for current buffer
--- @param start_row integer First line index